mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-04-21 11:13:40 +00:00
Fix QueryKeys ordering
This commit is contained in:
parent
351ac51691
commit
64647a4f87
1 changed files with 6 additions and 6 deletions
|
@ -220,6 +220,12 @@ func (a *KeyInternalAPI) QueryDeviceMessages(ctx context.Context, req *api.Query
|
|||
}
|
||||
|
||||
func (a *KeyInternalAPI) QueryKeys(ctx context.Context, req *api.QueryKeysRequest, res *api.QueryKeysResponse) {
|
||||
// get cross-signing keys from the database
|
||||
if err := a.crossSigningKeys(ctx, req, res); err != nil {
|
||||
// TODO: handle this
|
||||
util.GetLogger(ctx).WithError(err).Error("Failed to retrieve cross-signing keys")
|
||||
}
|
||||
|
||||
res.DeviceKeys = make(map[string]map[string]json.RawMessage)
|
||||
res.Failures = make(map[string]interface{})
|
||||
// make a map from domain to device keys
|
||||
|
@ -282,12 +288,6 @@ func (a *KeyInternalAPI) QueryKeys(ctx context.Context, req *api.QueryKeysReques
|
|||
return // nothing to query
|
||||
}
|
||||
|
||||
// get cross-signing keys from the database
|
||||
if err := a.crossSigningKeys(ctx, req, res); err != nil {
|
||||
// TODO: handle this
|
||||
util.GetLogger(ctx).WithError(err).Error("Failed to retrieve cross-signing keys")
|
||||
}
|
||||
|
||||
// perform key queries for remote devices
|
||||
a.queryRemoteKeys(ctx, req.Timeout, res, domainToDeviceKeys)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue