From c9d11d6f19d94bcecfbf1ec278bd4fa1f655d2c8 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 5 Jan 2022 14:26:15 +0100 Subject: [PATCH] missing otk count does not mean 0 but rather no change --- src/matrix/e2ee/Account.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/e2ee/Account.js b/src/matrix/e2ee/Account.js index da28c6fe..b704d7f5 100644 --- a/src/matrix/e2ee/Account.js +++ b/src/matrix/e2ee/Account.js @@ -231,7 +231,7 @@ export class Account { writeSync(deviceOneTimeKeysCount, txn, log) { // we only upload signed_curve25519 otks - const otkCount = deviceOneTimeKeysCount.signed_curve25519 || 0; + const otkCount = deviceOneTimeKeysCount.signed_curve25519; if (Number.isSafeInteger(otkCount) && otkCount !== this._serverOTKCount) { txn.session.set(SERVER_OTK_COUNT_SESSION_KEY, otkCount); log.set("otkCount", otkCount);