mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Reprioritise map creation
This commit is contained in:
parent
00dc43ce26
commit
f4637932b6
|
|
@ -473,6 +473,7 @@ func (a *KeyInternalAPI) QuerySignatures(ctx context.Context, req *api.QuerySign
|
||||||
}
|
}
|
||||||
|
|
||||||
for sourceUserID, forSourceUser := range keyMap {
|
for sourceUserID, forSourceUser := range keyMap {
|
||||||
|
for targetKeyID, targetSig := range forSourceUser {
|
||||||
if res.Signatures == nil {
|
if res.Signatures == nil {
|
||||||
res.Signatures = map[string]map[gomatrixserverlib.KeyID]types.CrossSigningSigMap{}
|
res.Signatures = map[string]map[gomatrixserverlib.KeyID]types.CrossSigningSigMap{}
|
||||||
}
|
}
|
||||||
|
|
@ -485,7 +486,6 @@ func (a *KeyInternalAPI) QuerySignatures(ctx context.Context, req *api.QuerySign
|
||||||
if _, ok := res.Signatures[targetUserID][targetKeyID][sourceUserID]; !ok {
|
if _, ok := res.Signatures[targetUserID][targetKeyID][sourceUserID]; !ok {
|
||||||
res.Signatures[targetUserID][targetKeyID][sourceUserID] = map[gomatrixserverlib.KeyID]gomatrixserverlib.Base64Bytes{}
|
res.Signatures[targetUserID][targetKeyID][sourceUserID] = map[gomatrixserverlib.KeyID]gomatrixserverlib.Base64Bytes{}
|
||||||
}
|
}
|
||||||
for targetKeyID, targetSig := range forSourceUser {
|
|
||||||
res.Signatures[targetUserID][targetKeyID][sourceUserID][targetKeyID] = targetSig
|
res.Signatures[targetUserID][targetKeyID][sourceUserID][targetKeyID] = targetSig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue