summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2016-02-15 16:40:22 +0000
committerDaniel Wagner-Hall <daniel@matrix.org>2016-02-15 16:40:22 +0000
commit1bbb67c452f33d14e1d4c5b51cc1a694de53bbb8 (patch)
tree1350a55ac78d960fefddec6eff05b7bd81069542 /synapse/handlers/room.py
parentReuse update_membership from /join (diff)
downloadsynapse-1bbb67c452f33d14e1d4c5b51cc1a694de53bbb8.tar.xz
Use update_membership to kick guests
Diffstat (limited to '')
-rw-r--r--synapse/handlers/room.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 04916d4e24..8c8bacf5dd 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -404,7 +404,14 @@ class RoomMemberHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def update_membership(
-            self, requester, target, room_id, action, txn_id=None, room_hosts=None
+            self,
+            requester,
+            target,
+            room_id,
+            action,
+            txn_id=None,
+            room_hosts=None,
+            ratelimit=True,
     ):
         effective_membership_state = action
         if action in ["kick", "unban"]:
@@ -451,7 +458,7 @@ class RoomMemberHandler(BaseHandler):
         yield msg_handler.send_event(
             event,
             context,
-            ratelimit=True,
+            ratelimit=ratelimit,
             is_guest=requester.is_guest,
             room_hosts=room_hosts,
         )