From 307bba5b2909fb7ab6a4189f393548a4bb4ed1c8 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 13 Aug 2013 11:17:04 -0400 Subject: [PATCH] Add comment to some zephyr mirror CC de-duplication logic (imported from commit 86680f24329475dccc79731639d51a735fa873bf) --- zerver/lib/actions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 7943220c8b..863f54c646 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -306,6 +306,10 @@ def do_send_messages(messages): data['stream_name'] = message['stream'].name tornado_callbacks.send_notification(data) + # Note that this does not preserve the order of message ids + # returned. In practice, this shouldn't matter, as we only + # mirror single zephyr messages at a time and don't otherwise + # intermingle sending zephyr messages with other messages. return already_sent_ids + [message['message'].id for message in messages] def create_stream_if_needed(realm, stream_name, invite_only=False):