Skip to content

Commit

Permalink
better summary format
Browse files Browse the repository at this point in the history
  • Loading branch information
rubyowo committed May 12, 2024
1 parent 238afa4 commit 6d87734
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion backend/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6d87734

Please sign in to comment.