Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

email_notifications: Convert list() of generator to comprehensions.

Anders Kaseorg0e5e6d0890e9
diff --git a/zerver/lib/email_notifications.py b/zerver/lib/email_notifications.py
index 7522056fcb0..b68b8a01805 100644
--- a/zerver/lib/email_notifications.py
+++ b/zerver/lib/email_notifications.py
@@ -374,7 +374,7 @@ def do_send_missedmessage_events_reply_in_zulip(user_profile: UserProfile,
'realm_name_in_notifications': user_profile.realm_name_in_notifications,
})
- triggers = list(message['trigger'] for message in missed_messages)
+ triggers = [message['trigger'] for message in missed_messages]
unique_triggers = set(triggers)
context.update({
'mention': 'mentioned' in unique_triggers or 'wildcard_mentioned' in unique_triggers,
@@ -456,7 +456,7 @@ def do_send_missedmessage_events_reply_in_zulip(user_profile: UserProfile,
})
else:
context.update({
- 'messages': build_message_list(user_profile, list(m['message'] for m in missed_messages)),
+ 'messages': build_message_list(user_profile, [m['message'] for m in missed_messages]),
'sender_str': ", ".join(sender.full_name for sender in senders),
'realm_str': user_profile.realm.name,
'show_message_content': True,