summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-06-28 16:04:05 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-06-28 17:47:38 +0100
commita7a8bbf5021b11b14752c62cce669e7ea4c50d85 (patch)
tree83646c71504901521373637b7f615704e3ddfbc1 /synapse/handlers
parentChangelog (diff)
downloadsynapse-a7a8bbf5021b11b14752c62cce669e7ea4c50d85.tar.xz
Only ratelimit when sending the email
If we do the opposite, an event can arrive after or while sending the email and the 3PID invite event will get ratelimited.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/room_member.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py

index 0be3d94508..e940e4183b 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py
@@ -773,7 +773,7 @@ class RoomMemberHandler(object): # 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, update=False) + yield self.base_handler.ratelimit(requester) can_invite = yield self.third_party_event_rules.check_threepid_can_be_invited( medium, address, room_id, @@ -935,6 +935,7 @@ class RoomMemberHandler(object): "sender": user.to_string(), "state_key": token, }, + ratelimit=False, txn_id=txn_id, )