mirror of
https://github.com/element-hq/synapse.git
synced 2026-07-31 11:40:22 +00:00
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.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Adds the recursion_depth parameter to the response of the /relations endpoint if MSC3981 recursion is being performed.
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user