Skip to content

Commit

Permalink
Merge pull request #31 from ilya-nikolaev/develop
Browse files Browse the repository at this point in the history
Added check for question_parse_mode
  • Loading branch information
Tishka17 committed May 21, 2024
2 parents 88f53c7 + ac3bbbd commit dfcb89a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sulguk/aiogram_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ def _transform_poll(self, method: SendPoll, bot: Bot):
method.explanation_entities = explanation_result.entities
method.explanation_parse_mode = None

if not self._is_parse_mode_supported(
method, bot, "question_parse_mode"):
return

question_result = transform_html(method.question)
method.question = question_result.text
method.question_entities = question_result.entities
Expand Down

0 comments on commit dfcb89a

Please sign in to comment.