diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-05-21 08:31:14 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-05-21 08:31:14 -0400 |
| commit | aaba16c91bb0daff0dbef58609b54b1ff062c2cf (patch) | |
| tree | ab3bd077d325cdaca341e248e9547d9bb79329ef /packages/frontend/src | |
| parent | use config.url instead of "https://${config.host}" (diff) | |
| download | sharkey-aaba16c91bb0daff0dbef58609b54b1ff062c2cf.tar.gz sharkey-aaba16c91bb0daff0dbef58609b54b1ff062c2cf.tar.bz2 sharkey-aaba16c91bb0daff0dbef58609b54b1ff062c2cf.zip | |
exclude reply OP from preview
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/utility/extract-preview-urls.ts | 5 | ||||
| -rw-r--r-- | packages/frontend/src/utility/get-self-note-ids.ts | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/packages/frontend/src/utility/extract-preview-urls.ts b/packages/frontend/src/utility/extract-preview-urls.ts index dd066df888..5fc9c87a32 100644 --- a/packages/frontend/src/utility/extract-preview-urls.ts +++ b/packages/frontend/src/utility/extract-preview-urls.ts @@ -19,6 +19,11 @@ export function extractPreviewUrls(note: Misskey.entities.Note, contents: mfm.Mf url !== note.uri && // Local note url !== `${config.url}/notes/${note.id}` && + // Remote reply + url !== note.reply?.url && + url !== note.reply?.uri && + // Local reply + url !== `${config.url}/notes/${note.reply?.id}` && // Remote renote or quote url !== note.renote?.url && url !== note.renote?.uri && diff --git a/packages/frontend/src/utility/get-self-note-ids.ts b/packages/frontend/src/utility/get-self-note-ids.ts index b847615a06..07b6c076d3 100644 --- a/packages/frontend/src/utility/get-self-note-ids.ts +++ b/packages/frontend/src/utility/get-self-note-ids.ts @@ -11,6 +11,7 @@ import type * as Misskey from 'misskey-js'; */ export function getSelfNoteIds(note: Misskey.entities.Note): string[] { const ids = [note.id]; // Regular note + if (note.reply) ids.push(note.reply.id); // Reply if (note.renote) ids.push(note.renote.id); // Renote or quote if (note.renote?.renote) ids.push(note.renote.renote.id); // Renote *of* a quote return ids; |