mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-31 05:29:58 +01:00
electron-main: Fix some lint issues.
This commit is contained in:
parent
1d811b6f4b
commit
8add8d7717
@ -505,17 +505,17 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'initEventIndex':
|
case 'initEventIndex':
|
||||||
const userId = args[0];
|
|
||||||
const deviceId = args[1];
|
|
||||||
|
|
||||||
if (eventIndex === null) {
|
if (eventIndex === null) {
|
||||||
|
const userId = args[0];
|
||||||
|
const deviceId = args[1];
|
||||||
|
const passphraseKey = `seshat|${userId}|${deviceId}`;
|
||||||
|
|
||||||
let changePassphrase = false;
|
let changePassphrase = false;
|
||||||
let passphrase = seshatDefaultPassphrase;
|
let passphrase = seshatDefaultPassphrase;
|
||||||
|
|
||||||
if (keytar) {
|
if (keytar) {
|
||||||
try {
|
try {
|
||||||
// Try to get a passphrase for seshat.
|
// Try to get a passphrase for seshat.
|
||||||
const passphraseKey = `seshat|${userId}|${deviceId}`;
|
|
||||||
const storedPassphrase = await keytar.getPassword("element.io", passphraseKey);
|
const storedPassphrase = await keytar.getPassword("element.io", passphraseKey);
|
||||||
|
|
||||||
// If no passphrase was found mark that we should change
|
// If no passphrase was found mark that we should change
|
||||||
@ -564,11 +564,11 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||||||
throw (e);
|
throw (e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
eventIndex = await openSeshat();
|
eventIndex = await openSeshat();
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
sendError(payload.id, e);
|
sendError(payload.id, e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -585,7 +585,7 @@ ipcMain.on('seshat', async function(ev, payload) {
|
|||||||
|
|
||||||
// Re-open the event index with the new passphrase.
|
// Re-open the event index with the new passphrase.
|
||||||
eventIndex = new Seshat(eventStorePath, {newPassphrase});
|
eventIndex = new Seshat(eventStorePath, {newPassphrase});
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
sendError(payload.id, e);
|
sendError(payload.id, e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user