From 7cf688ea24385903edd0248902875e8d17ae7b22 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 21 Nov 2023 15:08:48 -0800 Subject: [PATCH] Fall back to alt tag --- src/util/notes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/notes.ts b/src/util/notes.ts index eaf1ffee..541bbe69 100644 --- a/src/util/notes.ts +++ b/src/util/notes.ts @@ -1,5 +1,5 @@ import {last, pluck, identity} from "ramda" -import {fromNostrURI} from "paravel" +import {fromNostrURI, Tags} from "paravel" import {nip19} from "nostr-tools" import {first, switcherFn} from "hurdak" @@ -20,7 +20,7 @@ export const urlIsMedia = (url: string) => export const parseContent = ({content, tags = []}: {content: string; tags?: string[][]}) => { const result: any[] = [] - let text = content.trim() + let text = content.trim() || new Tags(tags).getValue('alt') || "" let buffer = "" const parseNewline = () => {