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/directory.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/directory.py')
-rw-r--r-- | synapse/handlers/directory.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py index e0a778e7ff..88166f0187 100644 --- a/synapse/handlers/directory.py +++ b/synapse/handlers/directory.py @@ -212,17 +212,21 @@ class DirectoryHandler(BaseHandler): ) @defer.inlineCallbacks - def send_room_alias_update_event(self, user_id, room_id): + def send_room_alias_update_event(self, requester, user_id, room_id): aliases = yield self.store.get_aliases_for_room(room_id) msg_handler = self.hs.get_handlers().message_handler - yield msg_handler.create_and_send_nonmember_event({ - "type": EventTypes.Aliases, - "state_key": self.hs.hostname, - "room_id": room_id, - "sender": user_id, - "content": {"aliases": aliases}, - }, ratelimit=False) + yield msg_handler.create_and_send_nonmember_event( + requester, + { + "type": EventTypes.Aliases, + "state_key": self.hs.hostname, + "room_id": room_id, + "sender": user_id, + "content": {"aliases": aliases}, + }, + ratelimit=False + ) @defer.inlineCallbacks def get_association_from_room_alias(self, room_alias): |