Skip to content
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

Closed
yulianrudenko opened this issue Jan 11, 2023 · 7 comments
Closed

Problem with sending notifications to topic in bulk #225

yulianrudenko opened this issue Jan 11, 2023 · 7 comments

Comments

@yulianrudenko
Copy link

Hi, I might be wrong, but this does not work for me:
image

I'm trying to send Message/Notification to specific topic IN BULK:
image

@xtrinch
Copy link
Owner

xtrinch commented Jan 11, 2023

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

@xtrinch
Copy link
Owner

xtrinch commented Jan 11, 2023

Closing issue, feel free to reopen if any more issues arise

@xtrinch xtrinch closed this as completed Jan 11, 2023
@yulianrudenko
Copy link
Author

yulianrudenko commented Jan 11, 2023 via email

@xtrinch
Copy link
Owner

xtrinch commented Jan 11, 2023

Do you have an example on how you do that manually?

@yulianrudenko
Copy link
Author

yulianrudenko commented Jan 11, 2023 via email

@xtrinch
Copy link
Owner

xtrinch commented Jan 11, 2023

Oh yes this could be easily implemented as a copy of

def send_topic_message(
, using condition instead of topic

@yulianrudenko
Copy link
Author

yulianrudenko commented Feb 4, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants