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);
getKey().then((k) => {
console.log(k);
key = k;
});
});

View File

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