diff --git a/src/matrix/Session.js b/src/matrix/Session.js index 8fa9ef59..2f4e0f1d 100644 --- a/src/matrix/Session.js +++ b/src/matrix/Session.js @@ -795,7 +795,7 @@ export class Session { // to-device messages, to help us avoid throwing away one-time-keys that we // are about to receive messages for // (https://github.com/vector-im/riot-web/issues/2782). - if (!isCatchupSync) { + if (this._e2eeAccount && !isCatchupSync) { const needsToUploadOTKs = await this._e2eeAccount.generateOTKsIfNeeded(this._storage, log); if (needsToUploadOTKs) { await log.wrap("uploadKeys", log => this._e2eeAccount.uploadKeys(this._storage, false, log));