From ee60b2908694b9937b06a31077a85da018fc0ef2 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Thu, 27 Apr 2023 11:01:16 +0200 Subject: [PATCH] Fix racing between one-time-keys processing and sync --- src/sync.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync.ts b/src/sync.ts index 2088131a4bc..8bf0f8626fc 100644 --- a/src/sync.ts +++ b/src/sync.ts @@ -1525,7 +1525,7 @@ export class SyncApi { } // Handle one_time_keys_count and unused fallback keys - this.syncOpts.cryptoCallbacks?.processKeyCounts( + await this.syncOpts.cryptoCallbacks?.processKeyCounts( data.device_one_time_keys_count, data.device_unused_fallback_key_types ?? data["org.matrix.msc2732.device_unused_fallback_key_types"], );