From 1638029c9378ab820d2b10fa6efd3227eb180a7c Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Tue, 26 Mar 2024 15:07:54 +0100 Subject: [PATCH] Fix long-form note display --- src/components/LinkPreview/LinkPreview.tsx | 4 ++-- src/components/ParsedNote/ParsedNote.tsx | 6 +++--- src/translations.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/LinkPreview/LinkPreview.tsx b/src/components/LinkPreview/LinkPreview.tsx index 9ade6fb..98b8309 100644 --- a/src/components/LinkPreview/LinkPreview.tsx +++ b/src/components/LinkPreview/LinkPreview.tsx @@ -63,10 +63,10 @@ const LinkPreview: Component<{ preview: any, id?: string, bordered?: boolean, is class={klass()} target="_blank" > - + diff --git a/src/components/ParsedNote/ParsedNote.tsx b/src/components/ParsedNote/ParsedNote.tsx index 29135db..9a2b000 100644 --- a/src/components/ParsedNote/ParsedNote.tsx +++ b/src/components/ParsedNote/ParsedNote.tsx @@ -797,9 +797,9 @@ const ParsedNote: Component<{ const preview = { url, - description: mention.post.content.slice(0, 100), - images: [mention.user.picture], - title: authorName(mention.user), + description: (mention.post.tags.find(t => t[0] === 'summary') || [])[1] || mention.post.content.slice(0, 100), + images: [(mention.post.tags.find(t => t[0] === 'image') || [])[1] || mention.user.picture], + title: (mention.post.tags.find(t => t[0] === 'title') || [])[1] || authorName(mention.user), } return