mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Don't skip devices that don't have signatures
This commit is contained in:
parent
f4637932b6
commit
1c30fd9c97
|
|
@ -66,14 +66,8 @@ func GetUserDevices(
|
||||||
Keys: key,
|
Keys: key,
|
||||||
}
|
}
|
||||||
|
|
||||||
targetUser, ok := sigRes.Signatures[dev.UserID]
|
if targetUser, ok := sigRes.Signatures[dev.UserID]; ok {
|
||||||
if !ok {
|
if targetKey, ok := targetUser[gomatrixserverlib.KeyID(dev.DeviceID)]; !ok {
|
||||||
continue
|
|
||||||
}
|
|
||||||
targetKey, ok := targetUser[gomatrixserverlib.KeyID(dev.DeviceID)]
|
|
||||||
if !ok {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
for sourceUserID, forSourceUser := range targetKey {
|
for sourceUserID, forSourceUser := range targetKey {
|
||||||
for sourceKeyID, sourceKey := range forSourceUser {
|
for sourceKeyID, sourceKey := range forSourceUser {
|
||||||
if _, ok := device.Keys.Signatures[sourceUserID]; !ok {
|
if _, ok := device.Keys.Signatures[sourceUserID]; !ok {
|
||||||
|
|
@ -82,6 +76,8 @@ func GetUserDevices(
|
||||||
device.Keys.Signatures[sourceUserID][sourceKeyID] = sourceKey
|
device.Keys.Signatures[sourceUserID][sourceKeyID] = sourceKey
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
response.Devices = append(response.Devices, device)
|
response.Devices = append(response.Devices, device)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue