Skip to content

Commit

Permalink
request context should not be needed when calling emit() with namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ntamas committed Jan 22, 2016
1 parent 22c81dd commit cfb7958
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flask_socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,10 @@ def handle_my_custom_event(json):
addressing a room, or ``False`` to send to everyone
but the sender.
"""
namespace = kwargs.get('namespace', flask.request.namespace)
if 'namespace' in kwargs:
namespace = kwargs['namespace']
else:
namespace = flask.request.namespace
callback = kwargs.get('callback')
broadcast = kwargs.get('broadcast')
room = kwargs.get('room')
Expand Down

0 comments on commit cfb7958

Please sign in to comment.