From e904dbc19cba4992070a73046d9fba3115bd1dab Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Wed, 26 Jun 2013 08:05:22 -0400 Subject: [PATCH] Correctly set read flag for messages sent by yourself. Compare two user objects by id to prevent false negatives when the objects are fetched thru different paths. (imported from commit a41f30d27e2b8021600d89f32d6526f48677fd95) --- zephyr/lib/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/lib/actions.py b/zephyr/lib/actions.py index 4613f8e238..4600b90ef9 100644 --- a/zephyr/lib/actions.py +++ b/zephyr/lib/actions.py @@ -283,7 +283,7 @@ def do_send_messages(messages): for um in ums_to_create: sent_by_human = message['message'].sending_client.name.lower() in \ ['website', 'iphone', 'android'] - if um.user_profile == message['message'].sender and sent_by_human: + if um.user_profile.id == message['message'].sender.id and sent_by_human: um.flags |= UserMessage.flags.read if wildcard: um.flags |= UserMessage.flags.wildcard_mentioned