Skip to content
Snippets Groups Projects
Unverified Commit 01d0f8e7 authored by Brendan Abolivier's avatar Brendan Abolivier
Browse files

Don't update the ratelimiter before sending a 3PID invite

This would cause emails being sent, but Synapse responding with a 429 when creating the event. The client would then retry, and with bad timing the same scenario would happen again. Some testing I did ended up sending me 10 emails for one single invite because of this.
parent 555b6fa0
No related branches found
No related tags found
No related merge requests found
...@@ -676,7 +676,7 @@ class RoomMemberHandler(object): ...@@ -676,7 +676,7 @@ class RoomMemberHandler(object):
# We need to rate limit *before* we send out any 3PID invites, so we # We need to rate limit *before* we send out any 3PID invites, so we
# can't just rely on the standard ratelimiting of events. # can't just rely on the standard ratelimiting of events.
yield self.base_handler.ratelimit(requester) yield self.base_handler.ratelimit(requester, update=False)
can_invite = yield self.third_party_event_rules.check_threepid_can_be_invited( can_invite = yield self.third_party_event_rules.check_threepid_can_be_invited(
medium, address, room_id medium, address, room_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment