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

Add code M_USER_ACCOUNT_SUSPENDED, as per MSC3823. #12845

Merged
merged 3 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/12845.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New error code "M_ORG_MATRIX_MSC3823_USER_ACCOUNT_SUSPENDED", as per MSC3823.
babolivier marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 7 additions & 0 deletions synapse/api/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ class Codes(str, Enum):
WEAK_PASSWORD = "M_WEAK_PASSWORD"
INVALID_SIGNATURE = "M_INVALID_SIGNATURE"
USER_DEACTIVATED = "M_USER_DEACTIVATED"

# The account has been suspended on the server.
# By opposition to `USER_DEACTIVATED`, this is a reversible measure
# that can possibly be appealed and reverted.
# Part of MSC 3823.
babolivier marked this conversation as resolved.
Show resolved Hide resolved
USER_ACCOUNT_SUSPENDED = "M_ORG_MATRIX_MSC3823_USER_ACCOUNT_SUSPENDED"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

namespacing rules on error codes make this ORG.MATRIX.MSC3823.USER_ACCOUNT_SUSPENDED btw. M_ is a reserved/controlled namespace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


BAD_ALIAS = "M_BAD_ALIAS"
# For restricted join rules.
UNABLE_AUTHORISE_JOIN = "M_UNABLE_TO_AUTHORISE_JOIN"
Expand Down