summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/federation/transport/client.py12
-rw-r--r--synapse/federation/transport/server.py14
2 files changed, 26 insertions, 0 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py
index 17b93a28ab..d0f8da7516 100644
--- a/synapse/federation/transport/client.py
+++ b/synapse/federation/transport/client.py
@@ -474,6 +474,10 @@ class TransportLayerClient(object):
 
     @log_function
     def invite_to_group_notification(self, destination, group_id, user_id, content):
+        """Sent by group server to inform a user's server that they have been
+        invited.
+        """
+
         path = PREFIX + "/groups/local/%s/users/%s/invite" % (group_id, user_id)
 
         return self.client.post_json(
@@ -486,6 +490,10 @@ class TransportLayerClient(object):
     @log_function
     def remove_user_from_group_notification(self, destination, group_id, user_id,
                                             content):
+        """Sent by group server to inform a user's server that they have been
+        kicked from the group.
+        """
+
         path = PREFIX + "/groups/local/%s/users/%s/remove" % (group_id, user_id)
 
         return self.client.post_json(
@@ -497,6 +505,10 @@ class TransportLayerClient(object):
 
     @log_function
     def renew_group_attestation(self, destination, group_id, user_id, content):
+        """Sent by either a group server or a user's server to periodically update
+        the attestations
+        """
+
         path = PREFIX + "/groups/%s/renew_attestation/%s" % (group_id, user_id)
 
         return self.client.post_json(
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py
index e6b0f432fc..2286f6f8fd 100644
--- a/synapse/federation/transport/server.py
+++ b/synapse/federation/transport/server.py
@@ -610,6 +610,8 @@ class FederationVersionServlet(BaseFederationServlet):
 
 
 class FederationGroupsProfileServlet(BaseFederationServlet):
+    """Get the basic profile of a group on behalf of a user
+    """
     PATH = "/groups/(?P<group_id>[^/]*)/profile$"
 
     @defer.inlineCallbacks
@@ -626,6 +628,8 @@ class FederationGroupsProfileServlet(BaseFederationServlet):
 
 
 class FederationGroupsRoomsServlet(BaseFederationServlet):
+    """Get the rooms in a group on behalf of a user
+    """
     PATH = "/groups/(?P<group_id>[^/]*)/rooms$"
 
     @defer.inlineCallbacks
@@ -642,6 +646,8 @@ class FederationGroupsRoomsServlet(BaseFederationServlet):
 
 
 class FederationGroupsUsersServlet(BaseFederationServlet):
+    """Get the users in a group on behalf of a user
+    """
     PATH = "/groups/(?P<group_id>[^/]*)/users$"
 
     @defer.inlineCallbacks
@@ -658,6 +664,8 @@ class FederationGroupsUsersServlet(BaseFederationServlet):
 
 
 class FederationGroupsInviteServlet(BaseFederationServlet):
+    """Ask a group server to invite someone to the group
+    """
     PATH = "/groups/(?P<group_id>[^/]*)/users/(?P<user_id>[^/]*)/invite$"
 
     @defer.inlineCallbacks
@@ -674,6 +682,8 @@ class FederationGroupsInviteServlet(BaseFederationServlet):
 
 
 class FederationGroupsAcceptInviteServlet(BaseFederationServlet):
+    """Accept an invitation from the group server
+    """
     PATH = "/groups/(?P<group_id>[^/]*)/users/(?P<user_id>[^/]*)/accept_invite$"
 
     @defer.inlineCallbacks
@@ -689,6 +699,8 @@ class FederationGroupsAcceptInviteServlet(BaseFederationServlet):
 
 
 class FederationGroupsRemoveUserServlet(BaseFederationServlet):
+    """Leave or kick a user from the group
+    """
     PATH = "/groups/(?P<group_id>[^/]*)/users/(?P<user_id>[^/]*)/remove$"
 
     @defer.inlineCallbacks
@@ -705,6 +717,8 @@ class FederationGroupsRemoveUserServlet(BaseFederationServlet):
 
 
 class FederationGroupsRenewAttestaionServlet(BaseFederationServlet):
+    """A group or user's server renews their attestation
+    """
     PATH = "/groups/(?P<group_id>[^/]*)/renew_attestation/(?P<user_id>[^/]*)$"
 
     @defer.inlineCallbacks