diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-05-21 08:33:41 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-05-21 08:33:41 -0400 |
| commit | 2b2afdd53ab66ea8044f2f1c8301f1f78c5861ce (patch) | |
| tree | 55a1157c4262026e670c6165d0f3ec37c4703996 /packages | |
| parent | exclude reply OP from preview (diff) | |
| download | sharkey-2b2afdd53ab66ea8044f2f1c8301f1f78c5861ce.tar.gz sharkey-2b2afdd53ab66ea8044f2f1c8301f1f78c5861ce.tar.bz2 sharkey-2b2afdd53ab66ea8044f2f1c8301f1f78c5861ce.zip | |
look at renoteId / replyId in case the renote / reply was not packed
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/frontend/src/utility/get-self-note-ids.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/frontend/src/utility/get-self-note-ids.ts b/packages/frontend/src/utility/get-self-note-ids.ts index 07b6c076d3..7cd771e8a0 100644 --- a/packages/frontend/src/utility/get-self-note-ids.ts +++ b/packages/frontend/src/utility/get-self-note-ids.ts @@ -12,7 +12,10 @@ 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 + else if (note.replyId) ids.push(note.replyId); // Reply (not packed) if (note.renote) ids.push(note.renote.id); // Renote or quote + else if (note.renoteId) ids.push(note.renoteId); // Renote or quote (not packed) if (note.renote?.renote) ids.push(note.renote.renote.id); // Renote *of* a quote + else if (note.renote?.renoteId) ids.push(note.renote.renoteId); // Renote *of* a quote (not packed) return ids; } |