diff options
| author | Hazel K <acomputerdog@gmail.com> | 2024-10-02 00:49:26 -0400 |
|---|---|---|
| committer | Hazel K <acomputerdog@gmail.com> | 2024-10-02 00:49:26 -0400 |
| commit | 19204851a074bf112da3140fde6769f8dff5b03c (patch) | |
| tree | c45888fc3c235097a53f683b7108b2c22ce597aa /packages/backend/src | |
| parent | Revert "avoid TS errors in get-note-summary" (diff) | |
| download | sharkey-19204851a074bf112da3140fde6769f8dff5b03c.tar.gz sharkey-19204851a074bf112da3140fde6769f8dff5b03c.tar.bz2 sharkey-19204851a074bf112da3140fde6769f8dff5b03c.zip | |
Revert "respect CWs in note summaries"
This reverts commit cf49701c2a0d58acc503844703ad7832888985b2.
Diffstat (limited to 'packages/backend/src')
| -rw-r--r-- | packages/backend/src/misc/get-note-summary.ts | 10 |
1 files changed, 4 insertions, 6 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 : ''; } // ファイルが添付されているとき |