From 71ca199165f8ec8d49691979628c1da2ebda9b4d Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 6 Feb 2024 09:48:39 +0000 Subject: [PATCH] Accept unprefixed form of MSC3981 recurse parameter (#16842) Now that the MSC3981 has passed FCP --- changelog.d/16842.misc | 1 + synapse/rest/client/relations.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/16842.misc diff --git a/changelog.d/16842.misc b/changelog.d/16842.misc new file mode 100644 index 000000000..022ace7d9 --- /dev/null +++ b/changelog.d/16842.misc @@ -0,0 +1 @@ +Add support for stabilised [MSC3981](https://github.com/matrix-org/matrix-spec-proposals/pull/3981) that adds a `recurse` parameter on the `/relations` API. diff --git a/synapse/rest/client/relations.py b/synapse/rest/client/relations.py index e8dfeaa54..42da017f3 100644 --- a/synapse/rest/client/relations.py +++ b/synapse/rest/client/relations.py @@ -71,7 +71,7 @@ class RelationPaginationServlet(RestServlet): self._store, request, default_limit=5, default_dir=Direction.BACKWARDS ) if self._support_recurse: - recurse = parse_boolean( + recurse = parse_boolean(request, "recurse", default=False) or parse_boolean( request, "org.matrix.msc3981.recurse", default=False ) else: