forked from mystiq/hydrogen-web
interpret unreported signed_curve25519 as 0 OTKs
This commit is contained in:
parent
4dfbd3f3cd
commit
015c6b1c70
2 changed files with 2 additions and 2 deletions
|
@ -384,7 +384,7 @@ export class Session {
|
||||||
// sync transaction succeeded, modify object state now
|
// sync transaction succeeded, modify object state now
|
||||||
this._syncInfo = syncInfo;
|
this._syncInfo = syncInfo;
|
||||||
}
|
}
|
||||||
if (this._e2eeAccount && e2eeAccountChanges) {
|
if (this._e2eeAccount) {
|
||||||
this._e2eeAccount.afterSync(e2eeAccountChanges);
|
this._e2eeAccount.afterSync(e2eeAccountChanges);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ export class Account {
|
||||||
|
|
||||||
writeSync(deviceOneTimeKeysCount, txn) {
|
writeSync(deviceOneTimeKeysCount, txn) {
|
||||||
// we only upload signed_curve25519 otks
|
// we only upload signed_curve25519 otks
|
||||||
const otkCount = deviceOneTimeKeysCount.signed_curve25519;
|
const otkCount = deviceOneTimeKeysCount.signed_curve25519 || 0;
|
||||||
if (Number.isSafeInteger(otkCount) && otkCount !== this._serverOTKCount) {
|
if (Number.isSafeInteger(otkCount) && otkCount !== this._serverOTKCount) {
|
||||||
txn.session.set(SERVER_OTK_COUNT_SESSION_KEY, otkCount);
|
txn.session.set(SERVER_OTK_COUNT_SESSION_KEY, otkCount);
|
||||||
return otkCount;
|
return otkCount;
|
||||||
|
|
Loading…
Reference in a new issue