From 4d7e74b2e503373da66ec929afd1aa7010676878 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Fri, 11 Feb 2022 11:20:27 -0500 Subject: Support the MSC3715 for `/relations`. (#11941) This adds an unstable org.matrix.msc3715.dir parameter which acts like dir on /mesages. --- synapse/rest/client/relations.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'synapse/rest/client') 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, ) -- cgit 1.4.1