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

Commit 957e189

Browse files
committed
Add code M_USER_ACCOUNT_SUSPENDED, as per MSC3823.
Signed-off-by: David Teller <[email protected]>
1 parent 4fef76c commit 957e189

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-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+
New error code "M_USER_ACCOUNT_SUSPENDED", as per MSC3823.

synapse/api/errors.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ 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+
USER_ACCOUNT_SUSPENDED = "M_USER_ACCOUNT_SUSPENDED"
87+
8288
BAD_ALIAS = "M_BAD_ALIAS"
8389
# For restricted join rules.
8490
UNABLE_AUTHORISE_JOIN = "M_UNABLE_TO_AUTHORISE_JOIN"

0 commit comments

Comments
 (0)