mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 15:05:05 -04:00
Add a constant for receipt types (m.read). (#11531)
And expand some type hints in the receipts storage module.
This commit is contained in:
parent
7ecaa3b976
commit
d93362d87f
9 changed files with 87 additions and 45 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue