diff options
author | Kegsay <kegan@matrix.org> | 2020-07-30 11:15:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 11:15:46 +0100 |
commit | 9355fb5ac8c911bdbde6dcc0f279f716d8a8f60b (patch) | |
tree | c6a155f7b65e25c8ab4abaf7413fbb0531a02b12 /keyserver/internal | |
parent | 0fdd4f14d123e76bd3d0368947d3aab84a787946 (diff) |
Hook up device list updates to the sync notifier (#1231)
* WIP hooking up key changes
* Fix import cycle, get tests passing and binary compiling
* Linting and update whitelist
Diffstat (limited to 'keyserver/internal')
-rw-r--r-- | keyserver/internal/internal.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/keyserver/internal/internal.go b/keyserver/internal/internal.go index 240a5640..9a41e44f 100644 --- a/keyserver/internal/internal.go +++ b/keyserver/internal/internal.go @@ -41,6 +41,9 @@ type KeyInternalAPI struct { } func (a *KeyInternalAPI) QueryKeyChanges(ctx context.Context, req *api.QueryKeyChangesRequest, res *api.QueryKeyChangesResponse) { + if req.Partition < 0 { + req.Partition = a.Producer.DefaultPartition() + } userIDs, latest, err := a.DB.KeyChanges(ctx, req.Partition, req.Offset) if err != nil { res.Error = &api.KeyError{ @@ -48,6 +51,7 @@ func (a *KeyInternalAPI) QueryKeyChanges(ctx context.Context, req *api.QueryKeyC } } res.Offset = latest + res.Partition = req.Partition res.UserIDs = userIDs } |