events: Fix zulip_finish to not make assumptions about how queues work.

Previously, we had an issue with the ACKing protocol, where if a
virtualizable event (like a "read" flag) was dispatched to a queue
client immediately, we would not properly ACK the change because it
had been made a virtual event.

(imported from commit ea09812f8a5ba1d5aad65f536022e3dbc77b0f9e)
This commit is contained in:
Tim Abbott
2013-12-02 15:31:17 -05:00
parent dc5c410257
commit ad9659ea54

View File

@@ -95,7 +95,7 @@ class ClientDescriptor(object):
try:
self.current_handler._request._log_data['extra'] = "[%s/1]" % (self.event_queue.id,)
self.current_handler.zulip_finish(dict(result='success', msg='',
events=[event],
events=self.event_queue.contents(),
queue_id=self.event_queue.id),
self.current_handler._request,
apply_markdown=self.apply_markdown)