diff --git a/apps/wiki.json b/apps/wiki.json index b0f63af5..416773bd 100644 --- a/apps/wiki.json +++ b/apps/wiki.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "📝", - "previous": "&0dFKAKThgExsyMQN99dOX7HP4UBhYYnuhYTILTCO5FI=.sha256" + "previous": "&s6S7S8P4kxvqLRip/WX45Bw7h+GG79BjJRBZOnaDtaE=.sha256" } \ No newline at end of file diff --git a/apps/wiki/app.js b/apps/wiki/app.js index 88fee9eb..045cc284 100644 --- a/apps/wiki/app.js +++ b/apps/wiki/app.js @@ -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) {