summary refs log tree commit diff
path: root/synapse/handlers/_base.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2016-02-15 15:39:16 +0000
committerDaniel Wagner-Hall <daniel@matrix.org>2016-02-15 15:39:16 +0000
commite71095801fc376aac30ff9408ae7f0203684024d (patch)
treeee95d9524469d75bf5abd87b9e2c8ee1451399c3 /synapse/handlers/_base.py
parentMerge some room joining codepaths (diff)
downloadsynapse-e71095801fc376aac30ff9408ae7f0203684024d.tar.xz
Merge implementation of /join by alias or ID
This code is kind of rough (passing the remote servers down a long
chain), but is a step towards improvement.
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r--synapse/handlers/_base.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index 064e8723c8..8508ecdd49 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -188,9 +188,12 @@ class BaseHandler(object):
         )
 
     @defer.inlineCallbacks
-    def handle_new_client_event(self, event, context, extra_users=[]):
+    def handle_new_client_event(self, event, context, ratelimit=True, extra_users=[]):
         # We now need to go and hit out to wherever we need to hit out to.
 
+        if ratelimit:
+            self.ratelimit(event.sender)
+
         self.auth.check(event, auth_events=context.current_state)
 
         yield self.maybe_kick_guest_users(event, context.current_state.values())