From b653022a5a75ee435fc662b6abb763ff1a25db27 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 8 Sep 2020 15:24:36 +0200 Subject: [PATCH] do store our own device, otherwise need special case verifying own msgs --- src/matrix/e2ee/DeviceTracker.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/matrix/e2ee/DeviceTracker.js b/src/matrix/e2ee/DeviceTracker.js index 0045522f..6fa1333c 100644 --- a/src/matrix/e2ee/DeviceTracker.js +++ b/src/matrix/e2ee/DeviceTracker.js @@ -205,10 +205,6 @@ export class DeviceTracker { if (typeof ed25519Key !== "string" || typeof curve25519Key !== "string") { return false; } - // don't store our own device - if (userId === this._ownUserId && deviceId === this._ownDeviceId) { - return false; - } return this._hasValidSignature(deviceKeys); }); const verifiedKeys = verifiedEntries.map(([, deviceKeys]) => deviceKeys); @@ -287,7 +283,7 @@ export class DeviceTracker { if (queriedDevices && queriedDevices.length) { flattenedDevices = flattenedDevices.concat(queriedDevices); } - // filter out our own devices if it got in somehow (even though we should not store it) + // filter out our own device const devices = flattenedDevices.filter(device => { return !(device.userId === this._ownUserId && device.deviceId === this._ownDeviceId); });