@@ -1337,17 +1337,13 @@ def test_suspended_user_cannot_join_room(self) -> None:
13371337 "POST" , f"/join/{ self .room1 } " , access_token = self .tok2
13381338 )
13391339 self .assertEqual (channel .code , 403 )
1340- self .assertEqual (
1341- channel .json_body ["errcode" ], "ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED"
1342- )
1340+ self .assertEqual (channel .json_body ["errcode" ], "M_USER_SUSPENDED" )
13431341
13441342 channel = self .make_request (
13451343 "POST" , f"/rooms/{ self .room1 } /join" , access_token = self .tok2
13461344 )
13471345 self .assertEqual (channel .code , 403 )
1348- self .assertEqual (
1349- channel .json_body ["errcode" ], "ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED"
1350- )
1346+ self .assertEqual (channel .json_body ["errcode" ], "M_USER_SUSPENDED" )
13511347
13521348 def test_suspended_user_cannot_knock_on_room (self ) -> None :
13531349 # set the user as suspended
@@ -1361,9 +1357,7 @@ def test_suspended_user_cannot_knock_on_room(self) -> None:
13611357 shorthand = False ,
13621358 )
13631359 self .assertEqual (channel .code , 403 )
1364- self .assertEqual (
1365- channel .json_body ["errcode" ], "ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED"
1366- )
1360+ self .assertEqual (channel .json_body ["errcode" ], "M_USER_SUSPENDED" )
13671361
13681362 def test_suspended_user_cannot_invite_to_room (self ) -> None :
13691363 # set the user as suspended
@@ -1376,9 +1370,7 @@ def test_suspended_user_cannot_invite_to_room(self) -> None:
13761370 access_token = self .tok1 ,
13771371 content = {"user_id" : self .user2 },
13781372 )
1379- self .assertEqual (
1380- channel .json_body ["errcode" ], "ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED"
1381- )
1373+ self .assertEqual (channel .json_body ["errcode" ], "M_USER_SUSPENDED" )
13821374
13831375
13841376class RoomAppserviceTsParamTestCase (unittest .HomeserverTestCase ):
@@ -4011,9 +4003,7 @@ def test_suspended_user_cannot_send_message_to_room(self) -> None:
40114003 access_token = self .tok1 ,
40124004 content = {"body" : "hello" , "msgtype" : "m.text" },
40134005 )
4014- self .assertEqual (
4015- channel .json_body ["errcode" ], "ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED"
4016- )
4006+ self .assertEqual (channel .json_body ["errcode" ], "M_USER_SUSPENDED" )
40174007
40184008 def test_suspended_user_cannot_change_profile_data (self ) -> None :
40194009 # set the user as suspended
@@ -4026,9 +4016,7 @@ def test_suspended_user_cannot_change_profile_data(self) -> None:
40264016 content = {"avatar_url" : "mxc://matrix.org/wefh34uihSDRGhw34" },
40274017 shorthand = False ,
40284018 )
4029- self .assertEqual (
4030- channel .json_body ["errcode" ], "ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED"
4031- )
4019+ self .assertEqual (channel .json_body ["errcode" ], "M_USER_SUSPENDED" )
40324020
40334021 channel2 = self .make_request (
40344022 "PUT" ,
@@ -4037,9 +4025,7 @@ def test_suspended_user_cannot_change_profile_data(self) -> None:
40374025 content = {"displayname" : "something offensive" },
40384026 shorthand = False ,
40394027 )
4040- self .assertEqual (
4041- channel2 .json_body ["errcode" ], "ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED"
4042- )
4028+ self .assertEqual (channel2 .json_body ["errcode" ], "M_USER_SUSPENDED" )
40434029
40444030 def test_suspended_user_cannot_redact_messages_other_than_their_own (self ) -> None :
40454031 # first user sends message
@@ -4073,9 +4059,7 @@ def test_suspended_user_cannot_redact_messages_other_than_their_own(self) -> Non
40734059 content = {"reason" : "bogus" },
40744060 shorthand = False ,
40754061 )
4076- self .assertEqual (
4077- channel .json_body ["errcode" ], "ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED"
4078- )
4062+ self .assertEqual (channel .json_body ["errcode" ], "M_USER_SUSPENDED" )
40794063
40804064 # but can redact their own
40814065 channel = self .make_request (
0 commit comments