From 6d87734c4d54517b398d2be746cc8911ddecc472 Mon Sep 17 00:00:00 2001 From: Ruby Date: Sun, 12 May 2024 16:35:11 +0200 Subject: [PATCH] better summary format --- backend/src/utils.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 2e2d5ca32..5cc7a1991 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1327,7 +1327,14 @@ export function messageSummary(msg: SavedMessage) { } if (msg.data.poll) { - result += "Poll: ```" + escapeCodeBlock(JSON.stringify(msg.data.poll)) + "```"; + const poll = msg.data.poll; + result += + "Poll: ```" + + escapeCodeBlock( + `Question: ${poll.question.text} + Answers: ${poll.answers.map((answer) => answer.text).join(" | ")}`, + ) + + "```"; } return result;