diff options
author | Erik Johnston <erik@matrix.org> | 2017-10-27 15:07:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-10-27 15:07:08 +0100 |
commit | 4ab8abbc2b7376f1fad8b69f05f129a0438d8d20 (patch) | |
tree | 692f839a218353f3e1a0263c12ea08a5c7be0019 /synapse/storage/group_server.py | |
parent | Merge pull request #2595 from matrix-org/erikj/attestation_commnet (diff) | |
parent | Import logger (diff) | |
download | synapse-4ab8abbc2b7376f1fad8b69f05f129a0438d8d20.tar.xz |
Merge branch 'erikj/attestation_local_fix' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/storage/group_server.py')
-rw-r--r-- | synapse/storage/group_server.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/synapse/storage/group_server.py b/synapse/storage/group_server.py index 095a3dd382..8c4ad0a9a9 100644 --- a/synapse/storage/group_server.py +++ b/synapse/storage/group_server.py @@ -1089,6 +1089,24 @@ class GroupServerStore(SQLBaseStore): desc="update_remote_attestion", ) + def remove_attestation_renewal(self, group_id, user_id): + """Remove an attestation that we thought we should renew, but actually + shouldn't. Ideally this would never get called as we would never + incorrectly try and do attestations for local users on local groups. + + Args: + group_id (str) + user_id (str) + """ + return self._simple_delete( + table="group_attestations_renewals", + keyvalues={ + "group_id": group_id, + "user_id": user_id, + }, + desc="remove_attestation_renewal", + ) + @defer.inlineCallbacks def get_remote_attestation(self, group_id, user_id): """Get the attestation that proves the remote agrees that the user is |