diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js index a40ce33ab4..ac5fda2894 100644 --- a/src/activitypub/notes.js +++ b/src/activitypub/notes.js @@ -219,7 +219,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => { } // Filter image attachments out if they are in content - const { attachment } = post._activitypub; + const attachment = post?._activitypub?.attachment; if (attachment && attachment.length) { post._activitypub.attachment = attachment.filter((attachment) => { const inContent = attachment.type === 'Image' && (post.sourceContent || post.content).includes(attachment.url);