mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 20:09:26 -05:00
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.
This commit is contained in:
parent
555b6fa0d5
commit
01d0f8e701
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user