mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-14 11:25:30 -04:00
Drop support for calling /_matrix/client/v3/rooms/{roomId}/invite
without an id_access_token
(#13241)
Fixes #13206 Signed-off-by: Jacek Kusnierz jacek.kusnierz@tum.de
This commit is contained in:
parent
42b11d5565
commit
84ddcd7bbf
9 changed files with 81 additions and 137 deletions
|
@ -3461,3 +3461,21 @@ class ThreepidInviteTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Also check that it stopped before calling _make_and_store_3pid_invite.
|
||||
make_invite_mock.assert_called_once()
|
||||
|
||||
def test_400_missing_param_without_id_access_token(self) -> None:
|
||||
"""
|
||||
Test that a 3pid invite request returns 400 M_MISSING_PARAM
|
||||
if we do not include id_access_token.
|
||||
"""
|
||||
channel = self.make_request(
|
||||
method="POST",
|
||||
path="/rooms/" + self.room_id + "/invite",
|
||||
content={
|
||||
"id_server": "example.com",
|
||||
"medium": "email",
|
||||
"address": "teresa@example.com",
|
||||
},
|
||||
access_token=self.tok,
|
||||
)
|
||||
self.assertEqual(channel.code, 400)
|
||||
self.assertEqual(channel.json_body["errcode"], "M_MISSING_PARAM")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue