mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-17 15:50:14 -04:00
Allow sending custom data with read receipts
This commit is contained in:
parent
b73debdab6
commit
e58055271c
2 changed files with 7 additions and 4 deletions
|
@ -122,7 +122,8 @@ class ReceiptsHandler(BaseHandler):
|
|||
return True
|
||||
|
||||
async def received_client_receipt(
|
||||
self, room_id: str, receipt_type: str, user_id: str, event_id: str
|
||||
self, room_id: str, receipt_type: str, user_id: str, event_id: str,
|
||||
extra_content: Optional[JsonDict] = None,
|
||||
) -> None:
|
||||
"""Called when a client tells us a local user has read up to the given
|
||||
event_id in the room.
|
||||
|
@ -132,7 +133,7 @@ class ReceiptsHandler(BaseHandler):
|
|||
receipt_type=receipt_type,
|
||||
user_id=user_id,
|
||||
event_ids=[event_id],
|
||||
data={"ts": int(self.clock.time_msec())},
|
||||
data={"ts": int(self.clock.time_msec()), **(extra_content or {})},
|
||||
)
|
||||
|
||||
is_new = await self._handle_new_receipts([receipt])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue