3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

better summary format

This commit is contained in:
Ruby 2024-05-12 16:35:11 +02:00
parent 16f5dc4fd7
commit 289b7cc79a
No known key found for this signature in database
GPG key ID: 74D9DB37B03A4804

View file

@ -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;