mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Except TypeError on empty access hash from 5018879
thoroughly
This commit is contained in:
@@ -150,9 +150,9 @@ class EventCommon(ChatGetter, abc.ABC):
|
||||
if not self._chat:
|
||||
return
|
||||
|
||||
self._input_chat = utils.get_input_peer(self._chat)
|
||||
if not getattr(self._input_chat, 'access_hash', True):
|
||||
# getattr with True to handle the InputPeerSelf() case
|
||||
try:
|
||||
self._input_chat = utils.get_input_peer(self._chat)
|
||||
except TypeError:
|
||||
try:
|
||||
self._input_chat = self._client.session.get_input_entity(
|
||||
self._chat_peer
|
||||
|
Reference in New Issue
Block a user