From 79a213ecec8997ee00265fd480f27de8cd4e54be Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Wed, 17 Feb 2021 15:29:36 +0000 Subject: 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 --- tests/federation/transport/test_knocking.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests') 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) -- cgit 1.5.1