-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with sending notifications to topic in bulk #225
Comments
The docs were a bit misleading in the migration section, you should use this:
As you dont send topic messages to specific devices, but rather subscribe the devices first and then send a general message to the topic |
Closing issue, feel free to reopen if any more issues arise |
*Thanks* for the explanation.
Could you please also tell me if it's possible to send
messages/notifications with *conditions* using your package? (for example
to send message only to users that are subscribed to 2 topics ath the same
time)
P.S. I know it's pretty easy to do manually but just wondering if it's
possible using your app, because didn't find anything related to this in
your repo/docs (and if not it could probably be a good *TODO* for the
future to improve your package as imho it's pretty useful functionality 🙂)
[image: image.png]
ср, 11 янв. 2023 г. в 09:46, Mojca Rojko ***@***.***>:
… The docs were a bit misleading in the migration section, you should use
this:
FCMDevice.objects.all().handle_topic_subscription(True, topic="TOPIC NAME"))
FCMDevice.send_topic_message(Message(data={...}), "TOPIC NAME")
As you dont send topic messages to specific devices, but rather subscribe
the devices first and then send a general message to the topic
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVCIU4PVEA4GOEJJOZUVQH3WRZXOPANCNFSM6AAAAAATXO6HN4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Do you have an example on how you do that manually? |
Yes, screenshot which I've sent in previous email, from docs:
https://firebase.google.com/docs/cloud-messaging/android/topic-messaging#python_3
*I believe '||' must be replaced with '&&' in my case*
[image: image.png]
ср, 11 янв. 2023 г. в 14:34, Mojca Rojko ***@***.***>:
… Do you have an example on how you do that manually?
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVCIU4PLQLAAHL6WHL7C7MDWR2ZGRANCNFSM6AAAAAATXO6HN4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Oh yes this could be easily implemented as a copy of fcm-django/fcm_django/models.py Line 362 in 3da06a6
condition instead of topic
|
Hi,
Sorry for bothering/asking You directly, but just one more question related
to Your package: if You still remember, is the package taking care of
Firebase limits?
I mean, if for example I'll try to send notifications to 2500 different
devices it will automatically split those 2500 notifications into "queues",
if i understand correctly in your code limit is set to 500 registration
tokens (I believe current limit set by Firebase is 1000), so those 2500
will ALL be sent "serially", 5 times (2500/500) not just the first 500
notifications. And so I do not have to split devices by myself before
sending, right?
Thanks in advance
ср, 11 янв. 2023 г. в 14:57, Mojca Rojko ***@***.***>:
… Oh yes this could be easily implemented as a copy of
https://github.com/xtrinch/fcm-django/blob/3da06a60970b9b61f5998128327b6fa01e628a29/fcm_django/models.py#L362,
using condition instead of topic
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVCIU4IV3VZHZJIQY4JQ6JTWR236LANCNFSM6AAAAAATXO6HN4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi, I might be wrong, but this does not work for me:
![image](https://user-images.githubusercontent.com/88377969/211697639-837ac4aa-6262-4236-9e81-6917a7a945c6.png)
I'm trying to send Message/Notification to specific topic IN BULK:
![image](https://user-images.githubusercontent.com/88377969/211698504-c544b498-863f-4d9e-832c-1d86e768664c.png)
The text was updated successfully, but these errors were encountered: