xtrinch/fcm-django

Problem with sending notifications to topic in bulk

yulianrudenko opened this issue · 7 comments

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

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

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

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

Oh yes this could be easily implemented as a copy of

def send_topic_message(
, using condition instead of topic