mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Remove logging
This commit is contained in:
parent
5428aae442
commit
8e70c77b0e
|
|
@ -569,8 +569,6 @@ func (a *KeyInternalAPI) uploadLocalDeviceKeys(ctx context.Context, req *api.Per
|
||||||
existingDeviceMap[key.ID] = struct{}{}
|
existingDeviceMap[key.ID] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.WithField("user_id", req.UserID).Infof("XXX: Existing devices: %+v", existingDeviceMap)
|
|
||||||
|
|
||||||
// Get all of the user existing device keys so we can check for changes.
|
// Get all of the user existing device keys so we can check for changes.
|
||||||
existingKeys, err := a.DB.DeviceKeysForUser(ctx, req.UserID, nil, true)
|
existingKeys, err := a.DB.DeviceKeysForUser(ctx, req.UserID, nil, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -580,8 +578,6 @@ func (a *KeyInternalAPI) uploadLocalDeviceKeys(ctx context.Context, req *api.Per
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.WithField("user_id", req.UserID).Infof("XXX: Existing keys: %+v", existingKeys)
|
|
||||||
|
|
||||||
// Work out whether we have device keys in the keyserver for devices that
|
// Work out whether we have device keys in the keyserver for devices that
|
||||||
// no longer exist in the user API. This is mostly an exercise to ensure
|
// no longer exist in the user API. This is mostly an exercise to ensure
|
||||||
// that we keep some integrity between the two.
|
// that we keep some integrity between the two.
|
||||||
|
|
@ -592,17 +588,14 @@ func (a *KeyInternalAPI) uploadLocalDeviceKeys(ctx context.Context, req *api.Per
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.WithField("user_id", req.UserID).Infof("XXX: Clean keys: %+v", toClean)
|
|
||||||
|
|
||||||
if len(toClean) > 0 {
|
if len(toClean) > 0 {
|
||||||
logrus.WithField("user_id", req.UserID).Infof("Cleaning up %d stale device keys for user", len(toClean))
|
|
||||||
if err = a.DB.DeleteDeviceKeys(ctx, req.UserID, toClean); err != nil {
|
if err = a.DB.DeleteDeviceKeys(ctx, req.UserID, toClean); err != nil {
|
||||||
res.Error = &api.KeyError{
|
res.Error = &api.KeyError{
|
||||||
Err: fmt.Sprintf("failed to clean device keys: %s", err.Error()),
|
Err: fmt.Sprintf("failed to clean device keys: %s", err.Error()),
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logrus.WithField("user_id", req.UserID).Infof("Cleaned up %d stale device keys for user", len(toClean))
|
logrus.WithField("user_id", req.UserID).Infof("Cleaned up %d stale keyserver device key entries", len(toClean))
|
||||||
}
|
}
|
||||||
|
|
||||||
var keysToStore []api.DeviceMessage
|
var keysToStore []api.DeviceMessage
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue