mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge pull request #13846 from vector-im/uhoreg/keytar
make IPC calls to get pickle key
This commit is contained in:
commit
d86fd9e753
@ -500,4 +500,30 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||||||
|
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getPickleKey(userId: string, deviceId: string): Promise<string | null> {
|
||||||
|
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<string | null> {
|
||||||
|
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<void> {
|
||||||
|
try {
|
||||||
|
await this._ipcCall('destroyPickleKey', userId, deviceId);
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user