log when devices get marked as outdated

This commit is contained in:
Bruno Windels 2021-02-18 14:00:06 +01:00
parent 8539b0c893
commit cd68bb7b3f

View file

@ -43,7 +43,7 @@ export class DeviceTracker {
this._ownDeviceId = ownDeviceId;
}
async writeDeviceChanges(deviceLists, txn) {
async writeDeviceChanges(deviceLists, txn, log) {
const {userIdentities} = txn;
// TODO: should we also look at left here to handle this?:
// the usual problem here is that you share a room with a user,
@ -56,6 +56,7 @@ export class DeviceTracker {
await Promise.all(deviceLists.changed.map(async userId => {
const user = await userIdentities.get(userId);
if (user) {
log.log({l: "outdated", id: userId})
user.deviceTrackingStatus = TRACKING_STATUS_OUTDATED;
userIdentities.set(user);
}