summary refs log tree commit diff
path: root/synapse/rest/client/notifications.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-12-08 12:26:29 -0500
committerGitHub <noreply@github.com>2021-12-08 12:26:29 -0500
commitd93362d87fbbf4941da06ade65eaf5df1672bccb (patch)
treec357e1655faa4e6c286b0ed3493ffc69ae9a529c /synapse/rest/client/notifications.py
parentClean up `synapse.rest.admin` (#11535) (diff)
downloadsynapse-d93362d87fbbf4941da06ade65eaf5df1672bccb.tar.xz
Add a constant for receipt types (m.read). (#11531)
And expand some type hints in the receipts storage module.
Diffstat (limited to 'synapse/rest/client/notifications.py')
-rw-r--r--synapse/rest/client/notifications.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/client/notifications.py b/synapse/rest/client/notifications.py
index d1d8a984c6..b12a332776 100644
--- a/synapse/rest/client/notifications.py
+++ b/synapse/rest/client/notifications.py
@@ -15,6 +15,7 @@
 import logging
 from typing import TYPE_CHECKING, Tuple
 
+from synapse.api.constants import ReceiptTypes
 from synapse.events.utils import format_event_for_client_v2_without_room_id
 from synapse.http.server import HttpServer
 from synapse.http.servlet import RestServlet, parse_integer, parse_string
@@ -54,7 +55,7 @@ class NotificationsServlet(RestServlet):
         )
 
         receipts_by_room = await self.store.get_receipts_for_user_with_orderings(
-            user_id, "m.read"
+            user_id, ReceiptTypes.READ
         )
 
         notif_event_ids = [pa["event_id"] for pa in push_actions]