From f31f6011115fb345f3bd2c3cf3938abfaabf37de Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 16 Mar 2023 10:41:59 +0000 Subject: federade quote-notes a bit better tested against the treehouse mastodon, but should work with others --- packages/frontend/src/components/MkNoteDetailed.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/frontend/src/components/MkNoteDetailed.vue') diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 8e1f69a0cc..03a417c24c 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -257,13 +257,16 @@ const reactButton = shallowRef(); const clipButton = shallowRef(); const likeButton = shallowRef(); let appearNote = $computed(() => isRenote ? note.renote as Misskey.entities.Note : note); +const renoteUrl = appearNote.renote ? appearNote.renote.url : null; +const renoteUri = appearNote.renote ? appearNote.renote.uri : null; + const isMyRenote = $i && ($i.id === note.userId); const showContent = ref(false); const isDeleted = ref(false); const muted = ref(checkWordMute(appearNote, $i, defaultStore.state.mutedWords)); const translation = ref(null); const translating = ref(false); -const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null; +const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)).filter(u => u !== renoteUrl && u !== renoteUri) : null; const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance); const conversation = ref([]); const replies = ref([]); -- cgit v1.2.3-freya