Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Ratelimit invites by room and target user #9258

Merged
merged 9 commits into from
Jan 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Pass through ratelimiting errors
  • Loading branch information
erikjohnston committed Jan 29, 2021
commit 4c76ab0fa28140f39991816108ddf36c37a53068
2 changes: 1 addition & 1 deletion synapse/federation/federation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ async def _do_send_invite(
"User's homeserver does not support this room version",
Codes.UNSUPPORTED_ROOM_VERSION,
)
elif e.code == 403:
elif e.code in (403, 429):
raise e.to_synapse_error()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks for added. This won't pass through retry_after_ms but I presume the client will have some default amount of time they'll wait for.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, hmm, why on earth don't we proxy through all the fields??

I don't think clients actually care about retry_after_ms...

else:
raise
Expand Down