mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 01:14:56 -04:00
Fix join ratelimiter breaking profile updates and idempotency (#8153)
This commit is contained in:
parent
2df82ae451
commit
393a811a41
4 changed files with 119 additions and 25 deletions
|
@ -39,7 +39,9 @@ class RestHelper(object):
|
|||
resource = attr.ib()
|
||||
auth_user_id = attr.ib()
|
||||
|
||||
def create_room_as(self, room_creator=None, is_public=True, tok=None):
|
||||
def create_room_as(
|
||||
self, room_creator=None, is_public=True, tok=None, expect_code=200,
|
||||
):
|
||||
temp_id = self.auth_user_id
|
||||
self.auth_user_id = room_creator
|
||||
path = "/_matrix/client/r0/createRoom"
|
||||
|
@ -54,9 +56,11 @@ class RestHelper(object):
|
|||
)
|
||||
render(request, self.resource, self.hs.get_reactor())
|
||||
|
||||
assert channel.result["code"] == b"200", channel.result
|
||||
assert channel.result["code"] == b"%d" % expect_code, channel.result
|
||||
self.auth_user_id = temp_id
|
||||
return channel.json_body["room_id"]
|
||||
|
||||
if expect_code == 200:
|
||||
return channel.json_body["room_id"]
|
||||
|
||||
def invite(self, room=None, src=None, targ=None, expect_code=200, tok=None):
|
||||
self.change_membership(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue