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.

message_send: Do not attempt to place a set into a message event.

Alex Vandiver2a0f3c974601
diff --git a/zerver/actions/message_send.py b/zerver/actions/message_send.py
index 5b994581a4a..0954b5c2e05 100644
--- a/zerver/actions/message_send.py
+++ b/zerver/actions/message_send.py
@@ -1204,7 +1204,7 @@ def do_send_messages(
user_ids_without_access_to_sender = user_ids_receiving_event - set(
user_ids_who_can_access_sender
)
- event["user_ids_without_access_to_sender"] = user_ids_without_access_to_sender
+ event["user_ids_without_access_to_sender"] = list(user_ids_without_access_to_sender)
if send_request.local_id is not None:
event["local_id"] = send_request.local_id
diff --git a/zerver/tornado/event_queue.py b/zerver/tornado/event_queue.py
index 11c01a61a61..8401313d0da 100644
--- a/zerver/tornado/event_queue.py
+++ b/zerver/tornado/event_queue.py
@@ -1110,7 +1110,9 @@ def process_message_event(
muted_sender_user_ids = set(event_template.get("muted_sender_user_ids", []))
all_bot_user_ids = set(event_template.get("all_bot_user_ids", []))
disable_external_notifications = event_template.get("disable_external_notifications", False)
- user_ids_without_access_to_sender = event_template.get("user_ids_without_access_to_sender", [])
+ user_ids_without_access_to_sender = set(
+ event_template.get("user_ids_without_access_to_sender", [])
+ )
realm_host = event_template.get("realm_host", "")
wide_dict: dict[str, Any] = event_template["message_dict"]