Sending encrypted messages. Revealing some weird behavior, but it's working.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4438 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -243,7 +243,11 @@ class TfMessageElement extends LitElement {
|
||||
async try_decrypt(content) {
|
||||
let result = await tfrpc.rpc.try_decrypt(this.whoami, content);
|
||||
if (result) {
|
||||
this.decrypted = JSON.parse(result);
|
||||
try {
|
||||
this.decrypted = JSON.parse(result);
|
||||
} catch {
|
||||
this.decrypted = result;
|
||||
}
|
||||
} else {
|
||||
this.decrypted = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user