From 99df1dcbd7cadd382cdadd22055bfd7bb5ef9c88 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 2 Jun 2023 23:55:31 -0700 Subject: [PATCH] fix: summary if 1 attachment --- packages/backend/src/misc/get-note-summary.ts | 2 +- packages/client/src/scripts/get-note-summary.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/misc/get-note-summary.ts b/packages/backend/src/misc/get-note-summary.ts index 63521c1c6..0a662e434 100644 --- a/packages/backend/src/misc/get-note-summary.ts +++ b/packages/backend/src/misc/get-note-summary.ts @@ -21,7 +21,7 @@ export const getNoteSummary = (note: Packed<"Note">): string => { // ファイルが添付されているとき if ((note.files || []).length !== 0) { const len = note.files?.length; - summary += ` 📎 (${len !== 1 ? len : ""})`; + summary += ` 📎${len !== 1 ? ` (${len})` : ""}`; } // 投票が添付されているとき diff --git a/packages/client/src/scripts/get-note-summary.ts b/packages/client/src/scripts/get-note-summary.ts index 4a1530162..bbbe4afb8 100644 --- a/packages/client/src/scripts/get-note-summary.ts +++ b/packages/client/src/scripts/get-note-summary.ts @@ -24,7 +24,7 @@ export const getNoteSummary = (note: misskey.entities.Note): string => { // ファイルが添付されているとき if ((note.files || []).length !== 0) { const len = note.files?.length; - summary += ` 📎 (${len !== 1 ? len : ""})`; + summary += ` 📎${len !== 1 ? ` (${len})` : ""}`; } // 投票が添付されているとき