summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2021-02-17 15:29:36 +0000
committerGitHub <noreply@github.com>2021-02-17 15:29:36 +0000
commit79a213ecec8997ee00265fd480f27de8cd4e54be (patch)
tree06ad43433404814afa8ac7c0de564fc9035524f1 /tests
parentShow knock rooms in the public room directory and inform clients they can be ... (diff)
downloadsynapse-79a213ecec8997ee00265fd480f27de8cd4e54be.tar.xz
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
Diffstat (limited to 'tests')
-rw-r--r--tests/federation/transport/test_knocking.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/federation/transport/test_knocking.py b/tests/federation/transport/test_knocking.py

index 9e30037ea3..f60fdd7983 100644 --- a/tests/federation/transport/test_knocking.py +++ b/tests/federation/transport/test_knocking.py
@@ -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)