Two wiki fixes that I've redone multiple times. :/
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4616 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -93,12 +93,16 @@ async function process_message(whoami, collection, message, kind, parent) {
|
||||
let content = JSON.parse(message.content);
|
||||
if (typeof content == 'string') {
|
||||
let x;
|
||||
for (let id of whoami) {
|
||||
for (let id of (whoami || [])) {
|
||||
x = await ssb.privateMessageDecrypt(id, content);
|
||||
if (x) {
|
||||
content = JSON.parse(x);
|
||||
content.draft = true;
|
||||
break;
|
||||
try {
|
||||
content = JSON.parse(x);
|
||||
content.draft = true;
|
||||
break;
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!x) {
|
||||
|
Reference in New Issue
Block a user