summary refs log tree commit diff
path: root/synapse/federation/transport/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-08-09 13:36:22 +0100
committerErik Johnston <erik@matrix.org>2017-08-09 13:36:22 +0100
commitef8e5786770ff285ebdf1fce420b5aa86437673c (patch)
tree61cad1a476d1d43cda40162ec4303dc625feb0e8 /synapse/federation/transport/server.py
parentAllow update group publicity (diff)
downloadsynapse-ef8e5786770ff285ebdf1fce420b5aa86437673c.tar.xz
Add bulk group publicised lookup API
Diffstat (limited to 'synapse/federation/transport/server.py')
-rw-r--r--synapse/federation/transport/server.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py
index e04750fd2a..b5f07c50bf 100644
--- a/synapse/federation/transport/server.py
+++ b/synapse/federation/transport/server.py
@@ -1050,6 +1050,22 @@ class FederationGroupsSummaryUsersServlet(BaseFederationServlet):
         defer.returnValue((200, resp))
 
 
+class FederationGroupsBulkPublicisedServlet(BaseFederationServlet):
+    """Get roles in a group
+    """
+    PATH = (
+        "/get_groups_publicised$"
+    )
+
+    @defer.inlineCallbacks
+    def on_POST(self, origin, content, query):
+        resp = yield self.handler.bulk_get_publicised_groups(
+            content["user_ids"], proxy=False,
+        )
+
+        defer.returnValue((200, resp))
+
+
 FEDERATION_SERVLET_CLASSES = (
     FederationSendServlet,
     FederationPullServlet,
@@ -1102,6 +1118,7 @@ GROUP_SERVER_SERVLET_CLASSES = (
 GROUP_LOCAL_SERVLET_CLASSES = (
     FederationGroupsLocalInviteServlet,
     FederationGroupsRemoveLocalUserServlet,
+    FederationGroupsBulkPublicisedServlet,
 )