mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-23 06:10:37 -04:00
Don't fail on empty bodies when sending out read receipts (#10531)
Fixes a bug introduced in rc1 that would cause Synapse to 400 on read receipts requests with empty bodies. Broken in #10413
This commit is contained in:
parent
903db99ed5
commit
e8a3e81402
3 changed files with 14 additions and 1 deletions
|
@ -43,7 +43,7 @@ class ReceiptRestServlet(RestServlet):
|
|||
if receipt_type != "m.read":
|
||||
raise SynapseError(400, "Receipt type must be 'm.read'")
|
||||
|
||||
body = parse_json_object_from_request(request)
|
||||
body = parse_json_object_from_request(request, allow_empty_body=True)
|
||||
hidden = body.get(ReadReceiptEventFields.MSC2285_HIDDEN, False)
|
||||
|
||||
if not isinstance(hidden, bool):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue