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:
Cory McWilliams 2023-11-07 23:31:12 +00:00
parent ee9cb63327
commit b3c9ad2fcb
2 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "📝", "emoji": "📝",
"previous": "&0dFKAKThgExsyMQN99dOX7HP4UBhYYnuhYTILTCO5FI=.sha256" "previous": "&s6S7S8P4kxvqLRip/WX45Bw7h+GG79BjJRBZOnaDtaE=.sha256"
} }

View File

@ -93,12 +93,16 @@ async function process_message(whoami, collection, message, kind, parent) {
let content = JSON.parse(message.content); let content = JSON.parse(message.content);
if (typeof content == 'string') { if (typeof content == 'string') {
let x; let x;
for (let id of whoami) { for (let id of (whoami || [])) {
x = await ssb.privateMessageDecrypt(id, content); x = await ssb.privateMessageDecrypt(id, content);
if (x) { if (x) {
try {
content = JSON.parse(x); content = JSON.parse(x);
content.draft = true; content.draft = true;
break; break;
} catch {
return;
}
} }
} }
if (!x) { if (!x) {