fcm-django icon indicating copy to clipboard operation
fcm-django copied to clipboard

Message is sent to inactive devices

Open eriktelepovsky opened this issue 3 years ago • 1 comments

Hi.

The README mentions that "devices marked as inactive will not be sent notifications" but it is actually not true. When you send message using device.send_message(), it is sent regardless the device is inactive.

The "active" value of boolean field is not checked anywhere in the code when sending message. Only when deactivating devices.

eriktelepovsky avatar Feb 11 '22 10:02 eriktelepovsky

https://github.com/xtrinch/fcm-django/blob/9987d21b1b6f1c13be71d2b1ba9e467855252b1a/fcm_django/models.py#L118 Yeah you're right it is only checked when sending in bulk, not when sending a single message. We should fix this.

xtrinch avatar Mar 22 '22 10:03 xtrinch