From 88c3a935267c3c7e443cae486cd28b00999365a8 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 9 Mar 2025 13:07:29 +0200 Subject: [PATCH] Fix text in poll bridging --- mautrix_telegram/portal_util/message_convert.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mautrix_telegram/portal_util/message_convert.py b/mautrix_telegram/portal_util/message_convert.py index 680ddc78..fe2fbebb 100644 --- a/mautrix_telegram/portal_util/message_convert.py +++ b/mautrix_telegram/portal_util/message_convert.py @@ -763,18 +763,18 @@ class TelegramMessageConverter: _n += 1 return _n - text_answers = "\n".join(f"{n()}. {answer.text}" for answer in poll.answers) - html_answers = "\n".join(f"
  • {answer.text}
  • " for answer in poll.answers) + text_answers = "\n".join(f"{n()}. {answer.text.text}" for answer in poll.answers) + html_answers = "\n".join(f"
  • {answer.text.text}
  • " for answer in poll.answers) vote_command = f"{self.command_prefix} vote {poll_id}" content = TextMessageEventContent( msgtype=MessageType.TEXT, format=Format.HTML, body=( - f"Poll: {poll.question}\n{text_answers}\n" + f"Poll: {poll.question.text}\n{text_answers}\n" f"Vote with {vote_command} " ), formatted_body=( - f"Poll: {poll.question}
    \n" + f"Poll: {poll.question.text}
    \n" f"
      {html_answers}
    \n" f"Vote with {vote_command} <choice number>" ),