summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-10-05 09:28:05 -0400
committerGitHub <noreply@github.com>2020-10-05 09:28:05 -0400
commitc5251c6fbd2722d54d33e02021f286053e611efc (patch)
tree60e73cdbf07541d0acfed0a7ab4595514963e32b /synapse/api
parentAdd logging on startup/shutdown (#8448) (diff)
downloadsynapse-c5251c6fbd2722d54d33e02021f286053e611efc.tar.xz
Do not assume that account data is of the correct form. (#8454)
This fixes a bug where `m.ignored_user_list` was assumed to be a dict,
leading to odd behavior for users who set it to something else.
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/constants.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py
index 46013cde15..592abd844b 100644
--- a/synapse/api/constants.py
+++ b/synapse/api/constants.py
@@ -155,3 +155,8 @@ class EventContentFields:
 class RoomEncryptionAlgorithms:
     MEGOLM_V1_AES_SHA2 = "m.megolm.v1.aes-sha2"
     DEFAULT = MEGOLM_V1_AES_SHA2
+
+
+class AccountDataTypes:
+    DIRECT = "m.direct"
+    IGNORED_USER_LIST = "m.ignored_user_list"