diff --git a/keyserver/internal/device_list_update.go b/keyserver/internal/device_list_update.go index 661a83a5e..40ba3a937 100644 --- a/keyserver/internal/device_list_update.go +++ b/keyserver/internal/device_list_update.go @@ -242,9 +242,8 @@ func (u *DeviceListUpdater) update(ctx context.Context, event gomatrixserverlib. }, } - // DeviceKeysJSON will side-effect modify this, so we create it - // separately to above os that DeviceKeys isn't pointer'd to the - // same place in both "keys" and "existingKeys" + // DeviceKeysJSON will side-effect modify this, so it needs + // to be a copy, not sharing any pointers with the above. deviceKeysCopy := *keys[0].DeviceKeys existingKeys := []api.DeviceMessage{ { diff --git a/keyserver/internal/internal.go b/keyserver/internal/internal.go index 4e3a7716b..0c264b718 100644 --- a/keyserver/internal/internal.go +++ b/keyserver/internal/internal.go @@ -711,9 +711,6 @@ func (a *KeyInternalAPI) uploadOneTimeKeys(ctx context.Context, req *api.Perform } func emitDeviceKeyChanges(producer KeyChangeProducer, existing, new []api.DeviceMessage) error { - logrus.Warnf("XXX: Existing: %+v", existing) - logrus.Warnf("XXX: New: %+v", new) - // find keys in new that are not in existing var keysAdded []api.DeviceMessage for _, newKey := range new {