mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
* fix #660 prepare parse mode for input_message_content of InlineQueryResult * remove redundant get * black lint * add towncrier patch note
This commit is contained in:
parent
7cb0ac1ee2
commit
71eb5fc44e
3 changed files with 29 additions and 2 deletions
|
|
@ -37,5 +37,12 @@ class AnswerInlineQuery(TelegramMethod[bool]):
|
|||
|
||||
def build_request(self, bot: Bot) -> Request:
|
||||
data: Dict[str, Any] = self.dict()
|
||||
prepare_parse_mode(bot, data["results"])
|
||||
|
||||
input_message_contents = []
|
||||
for result in data["results"]:
|
||||
input_message_content = result.get("input_message_content", None)
|
||||
if input_message_content is not None:
|
||||
input_message_contents.append(input_message_content)
|
||||
|
||||
prepare_parse_mode(bot, data["results"] + input_message_contents)
|
||||
return Request(method="answerInlineQuery", data=data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue