summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-07-18 10:31:59 +0100
committerErik Johnston <erik@matrix.org>2017-07-18 10:35:18 +0100
commitcccfcfa7b9e2af28bb56d6f970754fe5aa07ad56 (patch)
treec9b739a55b62a1557b09c6ba1fe3319f7733a3b8 /synapse/federation
parentUse transport client directly (diff)
downloadsynapse-cccfcfa7b9e2af28bb56d6f970754fe5aa07ad56.tar.xz
Comments
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/transport/server.py34
1 files changed, 19 insertions, 15 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py
index 0f08334f33..d68e90d2f7 100644
--- a/synapse/federation/transport/server.py
+++ b/synapse/federation/transport/server.py
@@ -715,21 +715,6 @@ class FederationGroupsInviteServlet(BaseFederationServlet):
         defer.returnValue((200, new_content))
 
 
-class FederationGroupsLocalInviteServlet(BaseFederationServlet):
-    PATH = "/groups/local/(?P<group_id>[^/]*)/users/(?P<user_id>[^/]*)/invite$"
-
-    @defer.inlineCallbacks
-    def on_POST(self, origin, content, query, group_id, user_id):
-        if get_domain_from_id(group_id) != origin:
-            raise SynapseError(403, "group_id doesn't match origin")
-
-        new_content = yield self.handler.on_invite(
-            group_id, user_id, content,
-        )
-
-        defer.returnValue((200, new_content))
-
-
 class FederationGroupsAcceptInviteServlet(BaseFederationServlet):
     """Accept an invitation from the group server
     """
@@ -765,7 +750,26 @@ class FederationGroupsRemoveUserServlet(BaseFederationServlet):
         defer.returnValue((200, new_content))
 
 
+class FederationGroupsLocalInviteServlet(BaseFederationServlet):
+    """A group server has invited a local user
+    """
+    PATH = "/groups/local/(?P<group_id>[^/]*)/users/(?P<user_id>[^/]*)/invite$"
+
+    @defer.inlineCallbacks
+    def on_POST(self, origin, content, query, group_id, user_id):
+        if get_domain_from_id(group_id) != origin:
+            raise SynapseError(403, "group_id doesn't match origin")
+
+        new_content = yield self.handler.on_invite(
+            group_id, user_id, content,
+        )
+
+        defer.returnValue((200, new_content))
+
+
 class FederationGroupsRemoveLocalUserServlet(BaseFederationServlet):
+    """A group server has removed a local user
+    """
     PATH = "/groups/local/(?P<group_id>[^/]*)/users/(?P<user_id>[^/]*)/remove$"
 
     @defer.inlineCallbacks