mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Don't mark your message as read if it comes from the API
(imported from commit 0570d4db590e21b0fadd544b10c9865fa7acd66b)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user