From 0edaf17c6afa352e9ffbf44a149b43255452695d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 16 Feb 2024 15:59:04 -0500 Subject: [PATCH] fix: don't crash when no attachment, oops --- src/activitypub/notes.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js index d9e037a248..1a521dceb9 100644 --- a/src/activitypub/notes.js +++ b/src/activitypub/notes.js @@ -86,6 +86,10 @@ Notes.updateLocalRecipients = async (id, { to, cc }) => { }; Notes.saveAttachments = async (id, attachments) => { + if (!attachments) { + return; + } + const bulkOps = { hash: [], zset: {