Skip to content

Commit 9b2ae62

Browse files
authored
Use stable error code for account locking (#17965)
1 parent a89b697 commit 9b2ae62

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

changelog.d/17965.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use stable `M_USER_LOCKED` error code for locked accounts, as per [Matrix 1.12](https://spec.matrix.org/v1.12/client-server-api/#account-locking).

synapse/api/errors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ class Codes(str, Enum):
8787
WEAK_PASSWORD = "M_WEAK_PASSWORD"
8888
INVALID_SIGNATURE = "M_INVALID_SIGNATURE"
8989
USER_DEACTIVATED = "M_USER_DEACTIVATED"
90-
# USER_LOCKED = "M_USER_LOCKED"
91-
USER_LOCKED = "ORG_MATRIX_MSC3939_USER_LOCKED"
90+
USER_LOCKED = "M_USER_LOCKED"
9291
NOT_YET_UPLOADED = "M_NOT_YET_UPLOADED"
9392
CANNOT_OVERWRITE_MEDIA = "M_CANNOT_OVERWRITE_MEDIA"
9493

0 commit comments

Comments
 (0)