diff --git a/zephyr/lib/actions.py b/zephyr/lib/actions.py index 09387caacf..fe1690e3b8 100644 --- a/zephyr/lib/actions.py +++ b/zephyr/lib/actions.py @@ -154,7 +154,9 @@ def do_send_message(message, rendered_content=None, no_log=False): for user_profile in recipients if user_profile.user.is_active] for um in ums_to_create: - if um.user_profile == message.sender: + sent_by_human = message.sending_client.name.lower() in \ + ['website', 'iphone', 'android'] + if um.user_profile == message.sender and sent_by_human: um.flags |= UserMessage.flags.read batch_bulk_create(UserMessage, ums_to_create) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index a639701441..f343a7068a 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -197,7 +197,10 @@ function message_unread(message) { return false; } - if (message.sender_email === email) { + var sent_by_human = ['website', 'iphone', 'android'] + .indexOf(message.client.toLowerCase()) !== -1; + + if (message.sender_email === email && sent_by_human) { return false; }