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,
|
||||
}
|
||||
|
||||
targetUser, ok := sigRes.Signatures[dev.UserID]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
targetKey, ok := targetUser[gomatrixserverlib.KeyID(dev.DeviceID)]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
if targetUser, ok := sigRes.Signatures[dev.UserID]; ok {
|
||||
if targetKey, ok := targetUser[gomatrixserverlib.KeyID(dev.DeviceID)]; !ok {
|
||||
for sourceUserID, forSourceUser := range targetKey {
|
||||
for sourceKeyID, sourceKey := range forSourceUser {
|
||||
if _, ok := device.Keys.Signatures[sourceUserID]; !ok {
|
||||
|
|
@ -82,6 +76,8 @@ func GetUserDevices(
|
|||
device.Keys.Signatures[sourceUserID][sourceKeyID] = sourceKey
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response.Devices = append(response.Devices, device)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue