1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

Avoid checking key backup status if guest

Fixes vector-im/riot-web#7839.

Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
J. Ryan Stinnett
2018-12-12 10:52:35 +00:00
parent c4452909e7
commit 6cf9563441
2 changed files with 6 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ describe("Crypto", function() {
mockBaseApis = {
sendToDevice: expect.createSpy(),
getKeyBackupVersion: expect.createSpy(),
isGuest: expect.createSpy(),
};
mockRoomList = {};

View File

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