mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 22:24:14 -04:00
Allow custom content in read receipts
This commit is contained in:
parent
4eddcf6653
commit
7dbc917769
4 changed files with 18 additions and 5 deletions
|
@ -65,7 +65,7 @@ class ReceiptRestServlet(RestServlet):
|
|||
f"Receipt type must be {', '.join(self._known_receipt_types)}",
|
||||
)
|
||||
|
||||
body = parse_json_object_from_request(request)
|
||||
body = parse_json_object_from_request(request, allow_empty_body=False)
|
||||
|
||||
# Pull the thread ID, if one exists.
|
||||
thread_id = None
|
||||
|
@ -100,6 +100,7 @@ class ReceiptRestServlet(RestServlet):
|
|||
room_id,
|
||||
user_id=requester.user.to_string(),
|
||||
event_id=event_id,
|
||||
extra_content=body,
|
||||
)
|
||||
else:
|
||||
await self.receipts_handler.received_client_receipt(
|
||||
|
@ -108,6 +109,7 @@ class ReceiptRestServlet(RestServlet):
|
|||
user_id=requester.user.to_string(),
|
||||
event_id=event_id,
|
||||
thread_id=thread_id,
|
||||
extra_content=body,
|
||||
)
|
||||
|
||||
return 200, {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue