diff options
author | Daniel Wagner-Hall <daniel@matrix.org> | 2016-03-03 16:43:42 +0000 |
---|---|---|
committer | Daniel Wagner-Hall <daniel@matrix.org> | 2016-03-03 16:43:42 +0000 |
commit | b4022cc487921ec46942a6a72fb174bb7aa1e459 (patch) | |
tree | 7aa3d0948b96053a705e2150318cb76fba189f38 /synapse/handlers/directory.py | |
parent | Merge pull request #571 from matrix-org/daniel/asids (diff) | |
download | synapse-b4022cc487921ec46942a6a72fb174bb7aa1e459.tar.xz |
Pass whole requester to ratelimiting
This will enable more detailed decisions
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): |