Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
push_notifications: Use a set comprehension.
Tim Abbottf5eac9282bc8
diff --git a/zerver/lib/push_notifications.py b/zerver/lib/push_notifications.pyindex 5d15f5e1705..6769b76568b 100644--- a/zerver/lib/push_notifications.py+++ b/zerver/lib/push_notifications.py@@ -1049,9 +1049,9 @@ def get_message_payload(# field. Note that this doesn't do a separate database query, because it uses# the `get_display_recipient_by_id` cache.display_recipients = get_display_recipient(message.recipient)- recipient_user_ids = set(+ recipient_user_ids = {display_recipient["id"] for display_recipient in display_recipients- )+ }if len(recipient_user_ids) == 1: # Recipient.PERSONALrecipient_user_ids.add(message.sender_id)data["recipient_user_ids"] = sorted(recipient_user_ids)