Delete one-time keys when deleting a device (#2208)

This commit is contained in:
Neil Alexander 2022-02-21 12:30:43 +00:00 committed by GitHub
parent 002429c9e2
commit a386fbed2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 0 deletions

View file

@ -31,6 +31,7 @@ type OneTimeKeys interface {
// SelectAndDeleteOneTimeKey selects a single one time key matching the user/device/algorithm specified and returns the algo:key_id => JSON.
// Returns an empty map if the key does not exist.
SelectAndDeleteOneTimeKey(ctx context.Context, txn *sql.Tx, userID, deviceID, algorithm string) (map[string]json.RawMessage, error)
DeleteOneTimeKeys(ctx context.Context, txn *sql.Tx, userID, deviceID string) error
}
type DeviceKeys interface {