summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-02-11 11:20:27 -0500
committerGitHub <noreply@github.com>2022-02-11 11:20:27 -0500
commit4d7e74b2e503373da66ec929afd1aa7010676878 (patch)
tree09971cfb8c6ab9aa594395b28f4405d10990d101 /synapse/rest
parentFetch thread summaries for multiple events in a single query (#11752) (diff)
downloadsynapse-4d7e74b2e503373da66ec929afd1aa7010676878.tar.xz
Support the MSC3715 for `/relations`. (#11941)
This adds an unstable org.matrix.msc3715.dir parameter
which acts like dir on /mesages.
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/relations.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/rest/client/relations.py b/synapse/rest/client/relations.py
index 9ec425888a..2cab83c4e6 100644
--- a/synapse/rest/client/relations.py
+++ b/synapse/rest/client/relations.py
@@ -111,6 +111,9 @@ class RelationPaginationServlet(RestServlet):
             raise SynapseError(404, "Unknown parent event.")
 
         limit = parse_integer(request, "limit", default=5)
+        direction = parse_string(
+            request, "org.matrix.msc3715.dir", default="b", allowed_values=["f", "b"]
+        )
         from_token_str = parse_string(request, "from")
         to_token_str = parse_string(request, "to")
 
@@ -128,6 +131,7 @@ class RelationPaginationServlet(RestServlet):
                 relation_type=relation_type,
                 event_type=event_type,
                 limit=limit,
+                direction=direction,
                 from_token=from_token,
                 to_token=to_token,
             )