mirror of
https://github.com/Discreetly/frontend.git
synced 2026-01-08 20:38:04 -05:00
removing clogs
This commit is contained in:
@@ -54,7 +54,6 @@
|
||||
updateMessages($selectedServer, roomId);
|
||||
|
||||
getKey().then((k) => {
|
||||
console.log(k);
|
||||
key = k;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user