diff --git a/components/status/StatusBody.vue b/components/status/StatusBody.vue index 733f9974..8a41e050 100644 --- a/components/status/StatusBody.vue +++ b/components/status/StatusBody.vue @@ -5,15 +5,29 @@ const { status, newer, withAction = true, + cleanSharedLink, } = defineProps<{ status: mastodon.v1.Status | mastodon.v1.StatusEdit newer?: mastodon.v1.Status withAction?: boolean + cleanSharedLink?: string | false }>() const { translation } = useTranslation(status, getLanguageCode()) const emojisObject = useEmojisFallback(() => status.emojis) + +/** + * example status raw content + * + *

🔴 trying to code live - come let's talk @elk and twitch.tv/ayoayco

+ * + * + * "

I say something about the link first

https://ayco.io

" + + * + */ + const vnode = $computed(() => { if (!status.content) return null @@ -24,7 +38,9 @@ const vnode = $computed(() => { collapseMentionLink: !!('inReplyToId' in status && status.inReplyToId), status: 'id' in status ? status : undefined, inReplyToStatus: newer, + cleanSharedLink, }) + return vnode }) diff --git a/components/status/StatusContent.vue b/components/status/StatusContent.vue index 459f4cd7..01a84355 100644 --- a/components/status/StatusContent.vue +++ b/components/status/StatusContent.vue @@ -16,6 +16,10 @@ const filter = $computed(() => filterResult?.filter) const filterPhrase = $computed(() => filter?.title) const isFiltered = $computed(() => filterPhrase && (context && context !== 'details' ? filter?.context.includes(context) : false)) + +const cleanSharedLink = !status.poll + && !status.mediaAttachments.length + && status.card?.url