mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Only count message queues when determining whether to deliver missed message emails
(imported from commit 5a302489f3bcb19e2824452a0d3c1330e483af7f)
This commit is contained in:
parent
26cd96f132
commit
33f4837570
@ -312,7 +312,9 @@ def process_new_message(data):
|
||||
received_pm = message.recipient.type in (Recipient.PERSONAL, Recipient.HUDDLE) and \
|
||||
user_profile_id != message.sender.id
|
||||
mentioned = 'mentioned' in flags
|
||||
idle = len(get_client_descriptors_for_user(user_profile_id)) == 0
|
||||
all_client_descriptors = get_client_descriptors_for_user(user_profile_id)
|
||||
message_event_queues = [client for client in all_client_descriptors if client.accepts_event_type('message')]
|
||||
idle = len(message_event_queues) == 0
|
||||
if (received_pm or mentioned) and idle:
|
||||
if receives_offline_notifications(user_profile_id):
|
||||
event = build_offline_notification_event(user_profile_id, message.id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user