Skip to content

Commit d305fb4

Browse files
committed
Also use both ratelimiters for upgrades
1 parent 93b47c9 commit d305fb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

synapse/handlers/room.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ async def upgrade_room(
204204
Raises:
205205
ShadowBanError if the requester is shadow-banned.
206206
"""
207+
await self.creation_ratelimiter.ratelimit(requester, update=False)
208+
209+
# then apply the ratelimits
207210
await self.common_request_ratelimiter.ratelimit(requester)
211+
await self.creation_ratelimiter.ratelimit(requester)
208212

209213
user_id = requester.user.to_string()
210214

0 commit comments

Comments
 (0)