removing clogs

This commit is contained in:
Tanner Shaw
2023-12-01 16:16:17 -06:00
parent 8bb47a9d53
commit b1a3c805bf
2 changed files with 0 additions and 4 deletions

View File

@@ -54,7 +54,6 @@
updateMessages($selectedServer, roomId); updateMessages($selectedServer, roomId);
getKey().then((k) => { getKey().then((k) => {
console.log(k);
key = k; key = k;
}); });
}); });

View File

@@ -26,17 +26,14 @@
async function decryptText(text: string): Promise<string> { async function decryptText(text: string): Promise<string> {
if (!key) { if (!key) {
console.log('key does not exist')
key = await getKey(); key = await getKey();
const result = await decrypt(text, key); const result = await decrypt(text, key);
return result ? result : text; return result ? result : text;
} else if (key) { } else if (key) {
console.log('key exists')
key = await deriveKey($roomPassStore[roomId].password, roomId); key = await deriveKey($roomPassStore[roomId].password, roomId);
const result = await decrypt(text, key); const result = await decrypt(text, key);
return result ? result : text; return result ? result : text;
} else { } else {
console.log('key does not exist')
return text; return text;
} }
} }