mirror of
https://github.com/element-hq/synapse.git
synced 2025-03-31 03:45:13 +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:
parent
c7d0d02be7
commit
25b3ba5328
2 changed files with 5 additions and 0 deletions
1
changelog.d/16775.bugfix
Normal file
1
changelog.d/16775.bugfix
Normal file
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue