missing otk count does not mean 0 but rather no change

This commit is contained in:
Bruno Windels 2022-01-05 14:26:15 +01:00
parent aabfbf507e
commit c9d11d6f19

View file

@ -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);