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