Fix Message._needed_markup_bot not returning bot in some cases (#3030)

This commit is contained in:
FujiApple 2021-04-19 14:20:03 +08:00 committed by GitHub
parent 3001b620ec
commit 5f16434346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]