summary refs log tree commit diff
path: root/synapse/groups/groups_server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-10-27 15:07:08 +0100
committerErik Johnston <erik@matrix.org>2017-10-27 15:07:08 +0100
commit4ab8abbc2b7376f1fad8b69f05f129a0438d8d20 (patch)
tree692f839a218353f3e1a0263c12ea08a5c7be0019 /synapse/groups/groups_server.py
parentMerge pull request #2595 from matrix-org/erikj/attestation_commnet (diff)
parentImport logger (diff)
downloadsynapse-4ab8abbc2b7376f1fad8b69f05f129a0438d8d20.tar.xz
Merge branch 'erikj/attestation_local_fix' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/groups/groups_server.py')
-rw-r--r--synapse/groups/groups_server.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py
index 4f9e459136..7406f67d07 100644
--- a/synapse/groups/groups_server.py
+++ b/synapse/groups/groups_server.py
@@ -646,6 +646,7 @@ class GroupsServerHandler(object):
             raise SynapseError(403, "User not invited to group")
 
         if not self.hs.is_mine_id(requester_user_id):
+            local_attestation = self.attestations.create_attestation(group_id, user_id)
             remote_attestation = content["attestation"]
 
             yield self.attestations.verify_attestation(
@@ -654,13 +655,9 @@ class GroupsServerHandler(object):
                 group_id=group_id,
             )
         else:
+            local_attestation = None
             remote_attestation = None
 
-        local_attestation = self.attestations.create_attestation(
-            group_id,
-            requester_user_id,
-        )
-
         is_public = _parse_visibility_from_contents(content)
 
         yield self.store.add_user_to_group(