fix: Message._needed_markup_bot not returning bot for the KeyboardButtonSwitchInline case when button.same_peer is True which is the case for buttons where switch_inline_query_current_chat is specified

This commit is contained in:
FujiApple 2021-04-19 11:13:14 +08:00
parent 3001b620ec
commit 3874249f2e

View File

@ -1125,6 +1125,7 @@ class Message(ChatGetter, SenderGetter, TLObject):
bot = self.input_sender
if not bot:
raise ValueError('No input sender')
return bot
else:
try:
return self._client._entity_cache[self.via_bot_id]