summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_member.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index ad3df7cc7d..3e86b9c690 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -710,8 +710,9 @@ class RoomMemberHandler(object):
                     Codes.FORBIDDEN,
                 )
 
-        # Check whether we'll be ratelimited
-        yield self.base_handler.ratelimit(requester, update=False)
+        # We need to rate limit *before* we send out any 3PID invites, so we
+        # can't just rely on the standard ratelimiting of events.
+        yield self.base_handler.ratelimit(requester)
 
         invitee = yield self._lookup_3pid(
             id_server, medium, address