mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Produce OTK counts in /sync response (#1235)
* Add QueryOneTimeKeys for /sync extensions * Unbreak tests * Produce OTK counts in /sync response * Linting
This commit is contained in:
parent
b5cb1d1534
commit
ffcb6d2ea1
13 changed files with 138 additions and 7 deletions
|
@ -31,6 +31,7 @@ type KeyInternalAPI interface {
|
|||
PerformClaimKeys(ctx context.Context, req *PerformClaimKeysRequest, res *PerformClaimKeysResponse)
|
||||
QueryKeys(ctx context.Context, req *QueryKeysRequest, res *QueryKeysResponse)
|
||||
QueryKeyChanges(ctx context.Context, req *QueryKeyChangesRequest, res *QueryKeyChangesResponse)
|
||||
QueryOneTimeKeys(ctx context.Context, req *QueryOneTimeKeysRequest, res *QueryOneTimeKeysResponse)
|
||||
}
|
||||
|
||||
// KeyError is returned if there was a problem performing/querying the server
|
||||
|
@ -157,3 +158,16 @@ type QueryKeyChangesResponse struct {
|
|||
// Set if there was a problem handling the request.
|
||||
Error *KeyError
|
||||
}
|
||||
|
||||
type QueryOneTimeKeysRequest struct {
|
||||
// The local user to query OTK counts for
|
||||
UserID string
|
||||
// The device to query OTK counts for
|
||||
DeviceID string
|
||||
}
|
||||
|
||||
type QueryOneTimeKeysResponse struct {
|
||||
// OTK key counts, in the extended /sync form described by https://matrix.org/docs/spec/client_server/r0.6.1#id84
|
||||
Count OneTimeKeysCount
|
||||
Error *KeyError
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue