mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
Remove "subject" in notifications.py.
These last few are all pretty safe.
This commit is contained in:
@@ -280,6 +280,7 @@ def build_custom_checkers(by_lang):
|
|||||||
'zerver/lib/actions.py',
|
'zerver/lib/actions.py',
|
||||||
'zerver/lib/test_classes.py',
|
'zerver/lib/test_classes.py',
|
||||||
'zerver/lib/message.py',
|
'zerver/lib/message.py',
|
||||||
|
'zerver/lib/notifications.py',
|
||||||
'zerver/lib/topic_mutes.py'])},
|
'zerver/lib/topic_mutes.py'])},
|
||||||
{'pattern': '^(?!#)@login_required',
|
{'pattern': '^(?!#)@login_required',
|
||||||
'description': '@login_required is unsupported; use @zulip_login_required',
|
'description': '@login_required is unsupported; use @zulip_login_required',
|
||||||
|
|||||||
@@ -270,10 +270,10 @@ def do_send_missedmessage_events_reply_in_zulip(user_profile: UserProfile,
|
|||||||
if not user_profile.enable_offline_email_notifications:
|
if not user_profile.enable_offline_email_notifications:
|
||||||
return
|
return
|
||||||
|
|
||||||
recipients = set((msg['message'].recipient_id, msg['message'].subject) for msg in missed_messages)
|
recipients = set((msg['message'].recipient_id, msg['message'].topic_name()) for msg in missed_messages)
|
||||||
if len(recipients) != 1:
|
if len(recipients) != 1:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'All missed_messages must have the same recipient and subject %r' %
|
'All missed_messages must have the same recipient and topic %r' %
|
||||||
recipients
|
recipients
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -439,7 +439,7 @@ def handle_missedmessage_emails(user_profile_id: int,
|
|||||||
|
|
||||||
bucket_tups = sorted(bucket_tups, key=lambda x: x[1])
|
bucket_tups = sorted(bucket_tups, key=lambda x: x[1])
|
||||||
|
|
||||||
# Send an email per recipient subject pair
|
# Send an email per bucket.
|
||||||
for bucket_tup, ignored_max_id in bucket_tups:
|
for bucket_tup, ignored_max_id in bucket_tups:
|
||||||
unique_messages = {}
|
unique_messages = {}
|
||||||
for m in messages_by_bucket[bucket_tup]:
|
for m in messages_by_bucket[bucket_tup]:
|
||||||
|
|||||||
Reference in New Issue
Block a user