rest_dispatch: Add support for using with websockets integration.

This commit is contained in:
Tim Abbott 2015-12-12 18:13:50 -08:00
parent c947f3ed3c
commit 023f45190f
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ def rest_dispatch(request, globals_list, **kwargs):
method_to_use = request.method
if request.POST and 'method' in request.POST:
method_to_use = request.POST['method']
if method_to_use == "SOCKET" and "zulip.emulated_method" in request.META:
method_to_use = request.META["zulip.emulated_method"]
if method_to_use in supported_methods.keys():
target_function = globals_list[supported_methods[method_to_use]]