diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2021-08-04 16:13:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-04 16:13:24 +0200 |
commit | e8a3e8140291be0548ad80d0e942a9aaae6c2434 (patch) | |
tree | 54102a62409ce7560da0772e5247ed0629246bf5 /synapse/rest | |
parent | Fix PeriodicallyFlushingMemoryHandler inhibiting application shutdown (#10517) (diff) | |
download | synapse-e8a3e8140291be0548ad80d0e942a9aaae6c2434.tar.xz |
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
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/receipts.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/receipts.py b/synapse/rest/client/v2_alpha/receipts.py index 4b98979b47..d9ab836cd8 100644 --- a/synapse/rest/client/v2_alpha/receipts.py +++ b/synapse/rest/client/v2_alpha/receipts.py @@ -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): |