summary refs log tree commit diff
path: root/synapse/groups
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-10-27 09:55:01 +0100
committerErik Johnston <erik@matrix.org>2017-10-27 09:55:01 +0100
commitd8dde19f04799270186723f7f35dc32217dda33e (patch)
tree12afb49394d503ac8420400f92ae6ec02d1e4a63 /synapse/groups
parentDon't generate group attestations for local users (diff)
downloadsynapse-d8dde19f04799270186723f7f35dc32217dda33e.tar.xz
Log if we try to do attestations for our own user and group
Diffstat (limited to 'synapse/groups')
-rw-r--r--synapse/groups/attestations.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/groups/attestations.py b/synapse/groups/attestations.py
index b751cf5e43..2e252b66a7 100644
--- a/synapse/groups/attestations.py
+++ b/synapse/groups/attestations.py
@@ -130,10 +130,16 @@ class GroupAttestionRenewer(object):
         def _renew_attestation(group_id, user_id):
             attestation = self.attestations.create_attestation(group_id, user_id)
 
-            if self.is_mine_id(group_id):
+            if not self.is_mine_id(group_id):
+                destination = get_domain_from_id(group_id)
+            else not self.is_mine_id(user_id):
                 destination = get_domain_from_id(user_id)
             else:
-                destination = get_domain_from_id(group_id)
+                logger.warn(
+                    "Incorrectly trying to do attestations for user: %r in %r",
+                    user_id, group_id,
+                )
+                return
 
             yield self.transport_client.renew_group_attestation(
                 destination, group_id, user_id,