diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-05-09 07:23:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 07:23:27 -0400 |
commit | 2bfe3f0b8193b62a92975b1f89f6b2e0eb643091 (patch) | |
tree | fec8d0bebeedd6664d6bea9759c9064a2a481845 /synapse/rest/client/account_data.py | |
parent | Bump hiredis from 2.2.2 to 2.2.3 (#15552) (diff) | |
download | synapse-2bfe3f0b8193b62a92975b1f89f6b2e0eb643091.tar.xz |
Use account data constants in more places. (#15554)
Diffstat (limited to 'synapse/rest/client/account_data.py')
-rw-r--r-- | synapse/rest/client/account_data.py | 3 |
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." |