Skip to content

Commit

Permalink
Merge pull request #283 from jsio-private/master
Browse files Browse the repository at this point in the history
send should not require flask request ctx
  • Loading branch information
miguelgrinberg authored Jul 15, 2016
2 parents aa34521 + 9ff7c39 commit 8419ac3
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 @@ -585,7 +585,10 @@ def send(message, **kwargs):
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 8419ac3

Please sign in to comment.