diff --git a/spec/unit/crypto.spec.js b/spec/unit/crypto.spec.js index e3cabbac604..4a752cce67b 100644 --- a/spec/unit/crypto.spec.js +++ b/spec/unit/crypto.spec.js @@ -70,6 +70,7 @@ describe("Crypto", function() { mockBaseApis = { sendToDevice: expect.createSpy(), getKeyBackupVersion: expect.createSpy(), + isGuest: expect.createSpy(), }; mockRoomList = {}; diff --git a/src/crypto/index.js b/src/crypto/index.js index a5212278894..17abf89337c 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -212,6 +212,11 @@ Crypto.prototype.init = async function() { */ Crypto.prototype._checkAndStartKeyBackup = async function() { console.log("Checking key backup status..."); + if (this._baseApis.isGuest()) { + console.log("Skipping key backup check since user is guest"); + this._checkedForBackup = true; + return; + } let backupInfo; try { backupInfo = await this._baseApis.getKeyBackupVersion();