From fb62f6dfb4d74b9e1e7919a74d478e3d8b2a7a17 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Thu, 28 May 2020 14:25:54 -0400 Subject: [PATCH] make IPC calls to get pickle key --- src/vector/platform/ElectronPlatform.tsx | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index f8bd22fb..ad63e6c9 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) {} + } }