diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index f68614d408..d2cf291da5 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -500,4 +500,30 @@ export default class ElectronPlatform extends VectorBasePlatform { return handled; } + + async getPickleKey(userId: string, deviceId: string): Promise { + try { + return await this._ipcCall('getPickleKey', userId, deviceId); + } catch (e) { + // if we can't connect to the password storage, assume there's no + // pickle key + return null; + } + } + + async createPickleKey(userId: string, deviceId: string): Promise { + try { + return await this._ipcCall('createPickleKey', userId, deviceId); + } catch (e) { + // if we can't connect to the password storage, assume there's no + // pickle key + return null; + } + } + + async destroyPickleKey(userId: string, deviceId: string): Promise { + try { + await this._ipcCall('destroyPickleKey', userId, deviceId); + } catch (e) {} + } } diff --git a/test/app-tests/loading-test.js b/test/app-tests/loading-test.js index 64872aaac9..363be81954 100644 --- a/test/app-tests/loading-test.js +++ b/test/app-tests/loading-test.js @@ -589,8 +589,10 @@ describe('loading:', function() { describe('Token login:', function() { it('logs in successfully', function() { + localStorage.setItem("mx_hs_url", "https://homeserver"); + localStorage.setItem("mx_is_url", "https://idserver"); loadApp({ - queryString: "?loginToken=secretToken&homeserver=https%3A%2F%2Fhomeserver&identityServer=https%3A%2F%2Fidserver", + queryString: "?loginToken=secretToken", }); return sleep(1).then(() => {