This commit is contained in:
Neil Alexander 2021-07-30 11:19:29 +01:00
parent 47233e19b8
commit e4c531b7d1
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 3 additions and 2 deletions

View file

@ -239,7 +239,7 @@ func (a *KeyInternalAPI) processOtherSignatures(
return nil return nil
} }
func (a *KeyInternalAPI) crossSigningKeys( func (a *KeyInternalAPI) crossSigningKeysFromDatabase(
ctx context.Context, req *api.QueryKeysRequest, res *api.QueryKeysResponse, ctx context.Context, req *api.QueryKeysRequest, res *api.QueryKeysResponse,
) { ) {
for userID := range req.UserToDevices { for userID := range req.UserToDevices {

View file

@ -227,7 +227,7 @@ func (a *KeyInternalAPI) QueryKeys(ctx context.Context, req *api.QueryKeysReques
res.Failures = make(map[string]interface{}) res.Failures = make(map[string]interface{})
// get cross-signing keys from the database // get cross-signing keys from the database
a.crossSigningKeys(ctx, req, res) a.crossSigningKeysFromDatabase(ctx, req, res)
// make a map from domain to device keys // make a map from domain to device keys
domainToDeviceKeys := make(map[string]map[string][]string) domainToDeviceKeys := make(map[string]map[string][]string)
@ -448,6 +448,7 @@ func (a *KeyInternalAPI) queryRemoteKeysOnServer(
} }
} }
queryKeysResp, err := a.FedClient.QueryKeys(fedCtx, gomatrixserverlib.ServerName(serverName), devKeys) queryKeysResp, err := a.FedClient.QueryKeys(fedCtx, gomatrixserverlib.ServerName(serverName), devKeys)
util.GetLogger(fedCtx).Infof("Query keys response: %+v", queryKeysResp)
if err == nil { if err == nil {
resultCh <- &queryKeysResp resultCh <- &queryKeysResp
return return