Add comment to some zephyr mirror CC de-duplication logic

(imported from commit 86680f24329475dccc79731639d51a735fa873bf)
This commit is contained in:
Zev Benjamin 2013-08-13 11:17:04 -04:00
parent 91c0be44a1
commit 307bba5b29
1 changed files with 4 additions and 0 deletions

View File

@ -306,6 +306,10 @@ def do_send_messages(messages):
data['stream_name'] = message['stream'].name data['stream_name'] = message['stream'].name
tornado_callbacks.send_notification(data) 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] return already_sent_ids + [message['message'].id for message in messages]
def create_stream_if_needed(realm, stream_name, invite_only=False): def create_stream_if_needed(realm, stream_name, invite_only=False):