mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 06:37:20 +02:00
fix: restore preview as it is now supported by BridyFed
https://bsky.brid.gy/internal/snarfed.org/2026-03-03_56661
This commit is contained in:
@@ -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.
|
// '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();
|
const image = attachment.filter(entry => entry.type === 'Image')?.shift();
|
||||||
// let preview;
|
let preview;
|
||||||
let summary = null;
|
let summary = null;
|
||||||
if (isArticle) {
|
if (isArticle) {
|
||||||
// Preview is not adopted by anybody, so is left commented-out for now
|
// Preview is not adopted by anybody, so is left commented-out for now
|
||||||
// preview = {
|
preview = {
|
||||||
// type: 'Note',
|
type: 'Note',
|
||||||
// attributedTo: `${nconf.get('url')}/uid/${post.user.uid}`,
|
attributedTo: `${nconf.get('url')}/uid/${post.user.uid}`,
|
||||||
// content: post.content,
|
content: post.content,
|
||||||
// published,
|
published,
|
||||||
// attachment,
|
attachment,
|
||||||
// };
|
};
|
||||||
|
|
||||||
if (post.content.includes(meta.config.activitypubBreakString)) {
|
if (post.content.includes(meta.config.activitypubBreakString)) {
|
||||||
const index = post.content.indexOf(meta.config.activitypubBreakString);
|
const index = post.content.indexOf(meta.config.activitypubBreakString);
|
||||||
@@ -844,7 +844,7 @@ Mocks.notes.public = async (post) => {
|
|||||||
context,
|
context,
|
||||||
audience,
|
audience,
|
||||||
...(summary && { summary }),
|
...(summary && { summary }),
|
||||||
// preview,
|
preview,
|
||||||
content: post.content,
|
content: post.content,
|
||||||
source,
|
source,
|
||||||
tag,
|
tag,
|
||||||
|
|||||||
Reference in New Issue
Block a user