1
0

Send a ver query parameter for make_knock (#83)

This informs the remote server of the room versions we support. If the room we're trying to
knock on has a version that is not one of our supported room versions, the remote server
will return an unsupported room version error.

Noticed in https://github.com/matrix-org/matrix-doc/pull/2403#discussion_r577042144

Ported from https://github.com/matrix-org/synapse/pull/6739
This commit is contained in:
Andrew Morgan
2021-02-17 15:29:36 +00:00
committed by GitHub
parent d180754623
commit 79a213ecec
4 changed files with 33 additions and 7 deletions

View File

@@ -229,8 +229,15 @@ class FederationKnockingTestCase(
_, channel = self.make_request(
"GET",
"/_matrix/federation/unstable/%s/make_knock/%s/%s"
% (KNOCK_UNSTABLE_IDENTIFIER, room_id, fake_knocking_user_id),
"/_matrix/federation/unstable/%s/make_knock/%s/%s?ver=%s"
% (
KNOCK_UNSTABLE_IDENTIFIER,
room_id,
fake_knocking_user_id,
# Inform the remote that we support the room version of the room we're
# knocking on
RoomVersions.MSC2403_DEV.identifier,
),
)
self.assertEquals(200, channel.code, channel.result)