Skip to content

Commit

Permalink
Fix get_sender when using it on a ChannelForbidden (#3053)
Browse files Browse the repository at this point in the history
Closes #3051.
  • Loading branch information
hauptmedia committed May 9, 2021
1 parent b2c26a5 commit 08a11ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion telethon/tl/custom/sendergetter.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get_sender(self):
# in which case we want to force fetch the entire thing because
# the user explicitly called a method. If the user is okay with
# cached information, they may use the property instead.
if (self._sender is None or self._sender.min) \
if (self._sender is None or getattr(self._sender, 'min', None)) \
and await self.get_input_sender():
try:
self._sender =\
Expand Down

0 comments on commit 08a11ee

Please sign in to comment.