Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 888eb73

Browse files
Yoricbabolivier
andauthored
Add code M_USER_ACCOUNT_SUSPENDED, as per MSC3823. (#12845)
Signed-off-by: David Teller <[email protected]> Co-authored-by: Brendan Abolivier <[email protected]>
1 parent 724e11d commit 888eb73

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

changelog.d/12845.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support the new error code "M_ORG_MATRIX_MSC3823_USER_ACCOUNT_SUSPENDED" from [MSC3823](https://github.com/matrix-org/matrix-spec-proposals/pull/3823).

synapse/api/errors.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ class Codes(str, Enum):
7979
WEAK_PASSWORD = "M_WEAK_PASSWORD"
8080
INVALID_SIGNATURE = "M_INVALID_SIGNATURE"
8181
USER_DEACTIVATED = "M_USER_DEACTIVATED"
82+
83+
# The account has been suspended on the server.
84+
# By opposition to `USER_DEACTIVATED`, this is a reversible measure
85+
# that can possibly be appealed and reverted.
86+
# Part of MSC3823.
87+
USER_ACCOUNT_SUSPENDED = "M_ORG_MATRIX_MSC3823_USER_ACCOUNT_SUSPENDED"
88+
8289
BAD_ALIAS = "M_BAD_ALIAS"
8390
# For restricted join rules.
8491
UNABLE_AUTHORISE_JOIN = "M_UNABLE_TO_AUTHORISE_JOIN"

0 commit comments

Comments
 (0)