summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-05-09 07:23:27 -0400
committerGitHub <noreply@github.com>2023-05-09 07:23:27 -0400
commit2bfe3f0b8193b62a92975b1f89f6b2e0eb643091 (patch)
treefec8d0bebeedd6664d6bea9759c9064a2a481845 /synapse/rest/client
parentBump hiredis from 2.2.2 to 2.2.3 (#15552) (diff)
downloadsynapse-2bfe3f0b8193b62a92975b1f89f6b2e0eb643091.tar.xz
Use account data constants in more places. (#15554)
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/account_data.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/client/account_data.py b/synapse/rest/client/account_data.py
index 43193ad086..8eebb21c76 100644
--- a/synapse/rest/client/account_data.py
+++ b/synapse/rest/client/account_data.py
@@ -15,6 +15,7 @@
 import logging
 from typing import TYPE_CHECKING, Tuple
 
+from synapse.api.constants import ReceiptTypes
 from synapse.api.errors import AuthError, Codes, NotFoundError, SynapseError
 from synapse.http.server import HttpServer
 from synapse.http.servlet import RestServlet, parse_json_object_from_request
@@ -166,7 +167,7 @@ class RoomAccountDataServlet(RestServlet):
 
         body = parse_json_object_from_request(request)
 
-        if account_data_type == "m.fully_read":
+        if account_data_type == ReceiptTypes.FULLY_READ:
             raise SynapseError(
                 405,
                 "Cannot set m.fully_read through this API."