diff options
author | Erik Johnston <erik@matrix.org> | 2017-10-27 10:30:21 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-10-27 10:30:21 +0100 |
commit | 82d8c1bacb085588b59021d21cd4df56b0d8411a (patch) | |
tree | 6783d215c48aa841bfbb551ce9f8c7173df202dc /synapse | |
parent | Remove incorrect attestations (diff) | |
download | synapse-82d8c1bacb085588b59021d21cd4df56b0d8411a.tar.xz |
Fixup
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/groups/attestations.py | 6 | ||||
-rw-r--r-- | synapse/storage/group_server.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/synapse/groups/attestations.py b/synapse/groups/attestations.py index 0bd73b6a61..4656e854f0 100644 --- a/synapse/groups/attestations.py +++ b/synapse/groups/attestations.py @@ -128,11 +128,9 @@ class GroupAttestionRenewer(object): @defer.inlineCallbacks def _renew_attestation(group_id, user_id): - attestation = self.attestations.create_attestation(group_id, user_id) - if not self.is_mine_id(group_id): destination = get_domain_from_id(group_id) - else not self.is_mine_id(user_id): + elif not self.is_mine_id(user_id): destination = get_domain_from_id(user_id) else: logger.warn( @@ -142,6 +140,8 @@ class GroupAttestionRenewer(object): yield self.store.remove_attestation_renewal(group_id, user_id) return + attestation = self.attestations.create_attestation(group_id, user_id) + yield self.transport_client.renew_group_attestation( destination, group_id, user_id, content={"attestation": attestation}, diff --git a/synapse/storage/group_server.py b/synapse/storage/group_server.py index ed2ee61ad2..ba3f5617fa 100644 --- a/synapse/storage/group_server.py +++ b/synapse/storage/group_server.py @@ -1095,8 +1095,8 @@ class GroupServerStore(SQLBaseStore): group_id (str) user_id (str) """ - return self._simple_update_one( - table="_simple_delete", + return self._simple_delete( + table="group_attestations_renewals", keyvalues={ "group_id": group_id, "user_id": user_id, |