From 2cad08001a94beebf9da4493d6a4f1927533c13f Mon Sep 17 00:00:00 2001 From: Hazel K Date: Wed, 2 Oct 2024 00:49:25 -0400 Subject: [PATCH] Revert "preserve non-text details in note summaries" This reverts commit 23659ab0135cf97a7380f6b75e9b89fd21337cc9. --- packages/backend/src/misc/get-note-summary.ts | 8 +++++--- packages/frontend/src/scripts/get-note-summary.ts | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/misc/get-note-summary.ts b/packages/backend/src/misc/get-note-summary.ts index 2652294103..58938d3b32 100644 --- a/packages/backend/src/misc/get-note-summary.ts +++ b/packages/backend/src/misc/get-note-summary.ts @@ -18,12 +18,14 @@ export const getNoteSummary = (note: Packed<'Note'>): string => { return '(⛔)'; } + if (note.cw != null) { + return `CW: ${note.cw}`; + } + let summary = ''; // 本文 - if (note.cw != null) { - summary += `CW: ${note.cw}`; - } else if (note.text) { + if (note.text) { summary += note.text; } diff --git a/packages/frontend/src/scripts/get-note-summary.ts b/packages/frontend/src/scripts/get-note-summary.ts index 6c70ced67f..d695b3a062 100644 --- a/packages/frontend/src/scripts/get-note-summary.ts +++ b/packages/frontend/src/scripts/get-note-summary.ts @@ -23,12 +23,14 @@ export const getNoteSummary = (note?: Misskey.entities.Note | null): string => { return `(${i18n.ts.invisibleNote})`; } + if (note.cw != null) { + return `CW: ${note.cw}`; + } + let summary = ''; // 本文 - if (note.cw != null) { - summary += `CW: ${note.cw}`; - } else if (note.text) { + if (note.text) { summary += note.text; }