diff --git a/changelog.d/16775.bugfix b/changelog.d/16775.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..99f04ca59d64ec07c011cc67821082dbeb02f575 --- /dev/null +++ b/changelog.d/16775.bugfix @@ -0,0 +1 @@ +Adds the recursion_depth parameter to the response of the /relations endpoint if MSC3981 recursion is being performed. diff --git a/synapse/handlers/relations.py b/synapse/handlers/relations.py index 444b795872f5826a1ab6af88407a627cfa673c42..642f7acf97b934a07205452a6464621a08ce0d15 100644 --- a/synapse/handlers/relations.py +++ b/synapse/handlers/relations.py @@ -180,6 +180,10 @@ class RelationsHandler: config=serialize_options, ), } + + if recurse: + return_value["recursion_depth"] = 3 + if include_original_event: # Do not bundle aggregations when retrieving the original event because # we want the content before relations are applied to it.