summary refs log tree commit diff
path: root/synapse/handlers/relations.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2024-01-04 09:57:21 +0000
committerGitHub <noreply@github.com>2024-01-04 09:57:21 +0000
commit25b3ba532832e86b59633c94a204a1902fb07d46 (patch)
treeaaf21f69c2c990905015c4823ddee3eb2a752b51 /synapse/handlers/relations.py
parentSearch non ASCII display names using Admin API (#16767) (diff)
downloadsynapse-25b3ba532832e86b59633c94a204a1902fb07d46.tar.xz
Add recursion_depth to /relations if recursing (#16775)
This is an extra response parameter just added to MSC3981. In the
current impl, the recursion depth is always 3, so this just returns a
static 3 if the recurse parameter is supplied.
Diffstat (limited to 'synapse/handlers/relations.py')
-rw-r--r--synapse/handlers/relations.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/relations.py b/synapse/handlers/relations.py
index 444b795872..642f7acf97 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.