diff options
author | Erik Johnston <erikj@jki.re> | 2016-08-04 14:38:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-04 14:38:59 +0100 |
commit | 1b5436ad782218bb7c31958ff5939a1458d39b4d (patch) | |
tree | 966b68430857e3fe505f4dcc285bb07c850963c3 /synapse/federation/transport/server.py | |
parent | Merge pull request #982 from matrix-org/erikj/fix_port_script (diff) | |
parent | Fix typos. (diff) | |
download | synapse-1b5436ad782218bb7c31958ff5939a1458d39b4d.tar.xz |
Merge pull request #979 from matrix-org/erikj/state_ids_api
Add /state_ids federation API
Diffstat (limited to 'synapse/federation/transport/server.py')
-rw-r--r-- | synapse/federation/transport/server.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py index 1a88413d18..0bc6e0801d 100644 --- a/synapse/federation/transport/server.py +++ b/synapse/federation/transport/server.py @@ -271,6 +271,17 @@ class FederationStateServlet(BaseFederationServlet): ) +class FederationStateIdsServlet(BaseFederationServlet): + PATH = "/state_ids/(?P<room_id>[^/]*)/" + + def on_GET(self, origin, content, query, room_id): + return self.handler.on_state_ids_request( + origin, + room_id, + query.get("event_id", [None])[0], + ) + + class FederationBackfillServlet(BaseFederationServlet): PATH = "/backfill/(?P<context>[^/]*)/" @@ -536,6 +547,7 @@ SERVLET_CLASSES = ( FederationPullServlet, FederationEventServlet, FederationStateServlet, + FederationStateIdsServlet, FederationBackfillServlet, FederationQueryServlet, FederationMakeJoinServlet, |