@@ -1337,17 +1337,13 @@ def test_suspended_user_cannot_join_room(self) -> None:
1337
1337
"POST" , f"/join/{ self .room1 } " , access_token = self .tok2
1338
1338
)
1339
1339
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" )
1343
1341
1344
1342
channel = self .make_request (
1345
1343
"POST" , f"/rooms/{ self .room1 } /join" , access_token = self .tok2
1346
1344
)
1347
1345
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" )
1351
1347
1352
1348
def test_suspended_user_cannot_knock_on_room (self ) -> None :
1353
1349
# set the user as suspended
@@ -1361,9 +1357,7 @@ def test_suspended_user_cannot_knock_on_room(self) -> None:
1361
1357
shorthand = False ,
1362
1358
)
1363
1359
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" )
1367
1361
1368
1362
def test_suspended_user_cannot_invite_to_room (self ) -> None :
1369
1363
# set the user as suspended
@@ -1376,9 +1370,7 @@ def test_suspended_user_cannot_invite_to_room(self) -> None:
1376
1370
access_token = self .tok1 ,
1377
1371
content = {"user_id" : self .user2 },
1378
1372
)
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" )
1382
1374
1383
1375
1384
1376
class RoomAppserviceTsParamTestCase (unittest .HomeserverTestCase ):
@@ -4011,9 +4003,7 @@ def test_suspended_user_cannot_send_message_to_room(self) -> None:
4011
4003
access_token = self .tok1 ,
4012
4004
content = {"body" : "hello" , "msgtype" : "m.text" },
4013
4005
)
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" )
4017
4007
4018
4008
def test_suspended_user_cannot_change_profile_data (self ) -> None :
4019
4009
# set the user as suspended
@@ -4026,9 +4016,7 @@ def test_suspended_user_cannot_change_profile_data(self) -> None:
4026
4016
content = {"avatar_url" : "mxc://matrix.org/wefh34uihSDRGhw34" },
4027
4017
shorthand = False ,
4028
4018
)
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" )
4032
4020
4033
4021
channel2 = self .make_request (
4034
4022
"PUT" ,
@@ -4037,9 +4025,7 @@ def test_suspended_user_cannot_change_profile_data(self) -> None:
4037
4025
content = {"displayname" : "something offensive" },
4038
4026
shorthand = False ,
4039
4027
)
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" )
4043
4029
4044
4030
def test_suspended_user_cannot_redact_messages_other_than_their_own (self ) -> None :
4045
4031
# first user sends message
@@ -4073,9 +4059,7 @@ def test_suspended_user_cannot_redact_messages_other_than_their_own(self) -> Non
4073
4059
content = {"reason" : "bogus" },
4074
4060
shorthand = False ,
4075
4061
)
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" )
4079
4063
4080
4064
# but can redact their own
4081
4065
channel = self .make_request (
0 commit comments