Skip to content

Commit 6d87734

Browse files
committed
better summary format
1 parent 238afa4 commit 6d87734

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

backend/src/utils.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,14 @@ export function messageSummary(msg: SavedMessage) {
13271327
}
13281328

13291329
if (msg.data.poll) {
1330-
result += "Poll: ```" + escapeCodeBlock(JSON.stringify(msg.data.poll)) + "```";
1330+
const poll = msg.data.poll;
1331+
result +=
1332+
"Poll: ```" +
1333+
escapeCodeBlock(
1334+
`Question: ${poll.question.text}
1335+
Answers: ${poll.answers.map((answer) => answer.text).join(" | ")}`,
1336+
) +
1337+
"```";
13311338
}
13321339

13331340
return result;

0 commit comments

Comments
 (0)