diff options
author | Kegsay <kegan@matrix.org> | 2020-08-03 12:29:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-03 12:29:58 +0100 |
commit | ffcb6d2ea199cfa985e72ffbdcb884fb9bc9f54d (patch) | |
tree | 6d25818803444fead9ab18db15e88e30be6641c6 /keyserver/storage/tables/interface.go | |
parent | b5cb1d153458ad83abdfbebed7405dd9da159cb8 (diff) |
Produce OTK counts in /sync response (#1235)
* Add QueryOneTimeKeys for /sync extensions
* Unbreak tests
* Produce OTK counts in /sync response
* Linting
Diffstat (limited to 'keyserver/storage/tables/interface.go')
-rw-r--r-- | keyserver/storage/tables/interface.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/keyserver/storage/tables/interface.go b/keyserver/storage/tables/interface.go index 8b89283f..c6e43be4 100644 --- a/keyserver/storage/tables/interface.go +++ b/keyserver/storage/tables/interface.go @@ -24,6 +24,7 @@ import ( type OneTimeKeys interface { SelectOneTimeKeys(ctx context.Context, userID, deviceID string, keyIDsWithAlgorithms []string) (map[string]json.RawMessage, error) + CountOneTimeKeys(ctx context.Context, userID, deviceID string) (*api.OneTimeKeysCount, error) InsertOneTimeKeys(ctx context.Context, keys api.OneTimeKeys) (*api.OneTimeKeysCount, error) // 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. |