From 4f2cb1bc1c63d4e20b52a311f8906a558d14259b Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Fri, 6 Dec 2013 15:08:02 -0500 Subject: [PATCH] Read read flags from UserMessage not Message (imported from commit 4c0f6ec90992c61ba861f5f347655673e769bebc) --- zerver/lib/actions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 54fb28b321..16c4434024 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -2012,9 +2012,10 @@ def do_send_missedmessage_events(user_profile, missed_messages): @statsd_increment("push_notifications") 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, + umessage = UserMessage.objects.get(user_profile=user_profile, message__id=missed_message['message_id']).message - if message.flags.read: + message = umessage.message + if umessage.flags.read: return sender_str = message.sender.full_name