mirror of https://github.com/zulip/zulip.git
Use a different format function when we don't respond to a get_updates immediately
For now, the new function, format_delayed_updates_response, just calls format_updates_response. (imported from commit dd332125fe0d47cb3990373f74e85e64604f58a3)
This commit is contained in:
parent
c8dd5229ed
commit
5ee6982a7e
|
@ -261,6 +261,9 @@ def format_updates_response(messages=[], apply_markdown=False, reason_empty=None
|
|||
ret['new_pointer'] = new_pointer
|
||||
return ret
|
||||
|
||||
def format_delayed_updates_response(**kwargs):
|
||||
return format_updates_response(**kwargs)
|
||||
|
||||
def return_messages_immediately(request, handler, user_profile, **kwargs):
|
||||
first = request.POST.get("first")
|
||||
last = request.POST.get("last")
|
||||
|
@ -356,7 +359,7 @@ def get_updates_backend(request, user_profile, handler, **kwargs):
|
|||
return
|
||||
try:
|
||||
kwargs.update(cb_kwargs)
|
||||
handler.finish(format_updates_response(**kwargs))
|
||||
handler.finish(format_delayed_updates_response(**kwargs))
|
||||
except socket.error:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue