diff options
author | Daniel Wagner-Hall <dawagner@gmail.com> | 2016-03-03 17:02:48 +0000 |
---|---|---|
committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2016-03-03 17:02:48 +0000 |
commit | 0b3083c75b0eb256df8dc1f5f71db134c3428035 (patch) | |
tree | ee0061a97caacbbbcd43aebcc4bc295facc05fbd /synapse/handlers/message.py | |
parent | Merge pull request #620 from matrix-org/erikj/jenkins (diff) | |
parent | Pass whole requester to ratelimiting (diff) | |
download | synapse-0b3083c75b0eb256df8dc1f5f71db134c3428035.tar.xz |
Merge pull request #621 from matrix-org/daniel/ratelimiting
Pass whole requester to ratelimiting
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index afa7c9c36c..cace1cb82a 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -215,7 +215,7 @@ class MessageHandler(BaseHandler): defer.returnValue((event, context)) @defer.inlineCallbacks - def send_nonmember_event(self, event, context, ratelimit=True): + def send_nonmember_event(self, requester, event, context, ratelimit=True): """ Persists and notifies local clients and federation of an event. @@ -241,6 +241,7 @@ class MessageHandler(BaseHandler): defer.returnValue(prev_state) yield self.handle_new_client_event( + requester=requester, event=event, context=context, ratelimit=ratelimit, @@ -268,9 +269,9 @@ class MessageHandler(BaseHandler): @defer.inlineCallbacks def create_and_send_nonmember_event( self, + requester, event_dict, ratelimit=True, - token_id=None, txn_id=None ): """ @@ -280,10 +281,11 @@ class MessageHandler(BaseHandler): """ event, context = yield self.create_event( event_dict, - token_id=token_id, + token_id=requester.access_token_id, txn_id=txn_id ) yield self.send_nonmember_event( + requester, event, context, ratelimit=ratelimit, |