Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
delete_messages: Pass a list of user ids in the event in all cases.
Mateusz Manderac3a8a15bae20
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.pyindex 96640856b08..4503a0b41da 100644--- a/zerver/lib/actions.py+++ b/zerver/lib/actions.py@@ -5790,8 +5790,7 @@ def do_delete_messages(realm: Realm, messages: Iterable[Message]) -> None:subscribers = get_active_subscriptions_for_stream_id(stream_id)# We exclude long-term idle users, since they by definition have no active clients.subscribers = subscribers.exclude(user_profile__long_term_idle=True)- subscriber_ids = [user.user_profile_id for user in subscribers]- users_to_notify = list(map(subscriber_info, subscriber_ids))+ users_to_notify = list(subscribers.values_list("user_profile_id", flat=True))archiving_chunk_size = retention.STREAM_MESSAGE_BATCH_SIZEmove_messages_to_archive(message_ids, realm=realm, chunk_size=archiving_chunk_size)diff --git a/zerver/tornado/event_queue.py b/zerver/tornado/event_queue.pyindex 866d78bfa40..11512be23ed 100644--- a/zerver/tornado/event_queue.py+++ b/zerver/tornado/event_queue.py@@ -1206,7 +1206,8 @@ def process_notification(notice: Mapping[str, Any]) -> None:# compatibility with events in that format still in the# queue at the time of upgrade.#- # TODO: Remove this block in release >= 4.0.+ # TODO/compatibility: Remove this block once you can no+ # longer directly upgrade directly from 3.x to master.user_ids: List[int] = [user["id"] for user in cast(List[Mapping[str, int]], users)]else:user_ids = cast(List[int], users)