mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
exclude reply OP from preview
This commit is contained in:
parent
28551c8103
commit
aaba16c91b
2 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,11 @@ export function extractPreviewUrls(note: Misskey.entities.Note, contents: mfm.Mf
|
||||||
url !== note.uri &&
|
url !== note.uri &&
|
||||||
// Local note
|
// Local note
|
||||||
url !== `${config.url}/notes/${note.id}` &&
|
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
|
// Remote renote or quote
|
||||||
url !== note.renote?.url &&
|
url !== note.renote?.url &&
|
||||||
url !== note.renote?.uri &&
|
url !== note.renote?.uri &&
|
||||||
|
|
|
@ -11,6 +11,7 @@ import type * as Misskey from 'misskey-js';
|
||||||
*/
|
*/
|
||||||
export function getSelfNoteIds(note: Misskey.entities.Note): string[] {
|
export function getSelfNoteIds(note: Misskey.entities.Note): string[] {
|
||||||
const ids = [note.id]; // Regular note
|
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) ids.push(note.renote.id); // Renote or quote
|
||||||
if (note.renote?.renote) ids.push(note.renote.renote.id); // Renote *of* a quote
|
if (note.renote?.renote) ids.push(note.renote.renote.id); // Renote *of* a quote
|
||||||
return ids;
|
return ids;
|
||||||
|
|
Loading…
Add table
Reference in a new issue