mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 06:58:27 +00:00
Fixes
This commit is contained in:
parent
9d69340ef1
commit
0d511c623b
2 changed files with 3 additions and 9 deletions
|
@ -391,9 +391,6 @@ func (u *DeviceListUpdater) updateDeviceList(res *gomatrixserverlib.RespUserDevi
|
|||
RespUserDeviceKeys: device.Keys,
|
||||
},
|
||||
}
|
||||
if device.DeviceID != "" {
|
||||
keys[i].DeviceKeys.DeviceID = device.DeviceID
|
||||
}
|
||||
if device.DisplayName != "" {
|
||||
keys[i].DeviceKeys.Unsigned = map[string]interface{}{
|
||||
"device_display_name": device.DisplayName,
|
||||
|
@ -412,10 +409,6 @@ func (u *DeviceListUpdater) updateDeviceList(res *gomatrixserverlib.RespUserDevi
|
|||
"failed to query device keys json for calculating diffs",
|
||||
)
|
||||
}
|
||||
|
||||
fmt.Println("EXISTING KEYS:", existingKeys[0].Unsigned)
|
||||
fmt.Println("NEW KEYS:", keys[0].Unsigned)
|
||||
|
||||
err := u.db.StoreRemoteDeviceKeys(ctx, keys, []string{res.UserID})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to store remote device keys: %w", err)
|
||||
|
|
|
@ -593,8 +593,9 @@ func appendDisplayNames(existing, new []api.DeviceMessage) []api.DeviceMessage {
|
|||
if existingDevice.DeviceID != newDevice.DeviceID {
|
||||
continue
|
||||
}
|
||||
existingDevice.Unsigned["device_display_name"] = newDevice.DisplayName()
|
||||
existing[i] = existingDevice
|
||||
existing[i].Unsigned = map[string]interface{}{
|
||||
"device_display_name": newDevice.DisplayName(),
|
||||
}
|
||||
}
|
||||
}
|
||||
return existing
|
||||
|
|
Loading…
Reference in a new issue