From 8a371d23cad0c595794310da93f7a625a6d4c648 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 4 Mar 2026 10:40:26 -0500 Subject: [PATCH] fix: restore `preview` as it is now supported by BridyFed https://bsky.brid.gy/internal/snarfed.org/2026-03-03_56661 --- src/activitypub/mocks.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js index de9284ddf2..02a0d7bc3c 100644 --- a/src/activitypub/mocks.js +++ b/src/activitypub/mocks.js @@ -766,17 +766,17 @@ Mocks.notes.public = async (post) => { // 'image' seems to be used as the preview image in lemmy/piefed, use the first one. const image = attachment.filter(entry => entry.type === 'Image')?.shift(); - // let preview; + let preview; let summary = null; if (isArticle) { // Preview is not adopted by anybody, so is left commented-out for now - // preview = { - // type: 'Note', - // attributedTo: `${nconf.get('url')}/uid/${post.user.uid}`, - // content: post.content, - // published, - // attachment, - // }; + preview = { + type: 'Note', + attributedTo: `${nconf.get('url')}/uid/${post.user.uid}`, + content: post.content, + published, + attachment, + }; if (post.content.includes(meta.config.activitypubBreakString)) { const index = post.content.indexOf(meta.config.activitypubBreakString); @@ -844,7 +844,7 @@ Mocks.notes.public = async (post) => { context, audience, ...(summary && { summary }), - // preview, + preview, content: post.content, source, tag,