From 47d557b38dab64b310c5531fc23d49c277da72c3 Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Thu, 10 Nov 2022 17:20:59 +0100 Subject: [PATCH] expand comment how to handle race here --- src/matrix/e2ee/DeviceTracker.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/matrix/e2ee/DeviceTracker.js b/src/matrix/e2ee/DeviceTracker.js index 484a6d0b..55f666e4 100644 --- a/src/matrix/e2ee/DeviceTracker.js +++ b/src/matrix/e2ee/DeviceTracker.js @@ -202,6 +202,9 @@ export class DeviceTracker { async _queryKeys(userIds, hsApi, log) { // TODO: we need to handle the race here between /sync and /keys/query just like we need to do for the member list ... // there are multiple requests going out for /keys/query though and only one for /members + // So, while doing /keys/query, writeDeviceChanges should add userIds marked as outdated to a list + // when /keys/query returns, we should check that list and requery if we queried for a given user. + // and then remove the list. const deviceKeyResponse = await hsApi.queryKeys({ "timeout": 10000,