mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
handle case of message getting read while processing missed_message
(imported from commit cd53efe3645f5dc8943becc2b8dbd3d607bb8eba)
This commit is contained in:
@@ -2000,8 +2000,9 @@ def do_send_missedmessage_events(user_profile, missed_messages):
|
||||
def handle_push_notification(user_profile_id, missed_message):
|
||||
user_profile = get_user_profile_by_id(user_profile_id)
|
||||
message = UserMessage.objects.get(user_profile=user_profile,
|
||||
message__id=missed_message['message_id'],
|
||||
flags=~UserMessage.flags.read).message
|
||||
message__id=missed_message['message_id']).message
|
||||
if message.flags.read:
|
||||
return
|
||||
sender_str = message.sender.full_name
|
||||
|
||||
if user_profile.enable_offline_push_notifications and num_push_devices_for_user(user_profile):
|
||||
|
||||
Reference in New Issue
Block a user