summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/handlers/room.py')
-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,
         )