From 19204851a074bf112da3140fde6769f8dff5b03c Mon Sep 17 00:00:00 2001 From: Hazel K Date: Wed, 2 Oct 2024 00:49:26 -0400 Subject: [PATCH] Revert "respect CWs in note summaries" This reverts commit cf49701c2a0d58acc503844703ad7832888985b2. --- packages/backend/src/misc/get-note-summary.ts | 10 ++++------ packages/frontend/src/scripts/get-note-summary.ts | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/backend/src/misc/get-note-summary.ts b/packages/backend/src/misc/get-note-summary.ts index 5038106870..1a07139a50 100644 --- a/packages/backend/src/misc/get-note-summary.ts +++ b/packages/backend/src/misc/get-note-summary.ts @@ -18,15 +18,13 @@ export const getNoteSummary = (note: Packed<'Note'>): string => { return '(⛔)'; } - if (note.cw != null) { - return `CW: ${note.cw}`; - } - let summary = ''; // 本文 - if (note.text) { - summary += note.text; + if (note.cw != null) { + summary += note.cw; + } else { + summary += note.text ? note.text : ''; } // ファイルが添付されているとき diff --git a/packages/frontend/src/scripts/get-note-summary.ts b/packages/frontend/src/scripts/get-note-summary.ts index 85903231a4..6fd9947ac1 100644 --- a/packages/frontend/src/scripts/get-note-summary.ts +++ b/packages/frontend/src/scripts/get-note-summary.ts @@ -23,15 +23,13 @@ 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.text) { - summary += note.text; + if (note.cw != null) { + summary += note.cw; + } else { + summary += note.text ? note.text : ''; } // ファイルが添付されているとき