Skip to content

Commit

Permalink
fix: the message was sent to individual inactive device (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nomer77 authored May 9, 2024
1 parent daec997 commit 99a6399
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fcm_django/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ def send_message(
:returns messaging.SendResponse or FirebaseError if the device was
deactivated due to an error.
"""
if not self.active:
return messaging.SendResponse(
None,
None,
)
message.token = self.registration_id
try:
return messaging.SendResponse(
Expand Down

0 comments on commit 99a6399

Please sign in to comment.