mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Remove PackedChat
In favour of using the session entity type consistently.
This commit is contained in:
@@ -241,11 +241,11 @@ async def get_input_entity(
|
||||
entity = await self._session.get_entity(None, peer_id)
|
||||
if entity:
|
||||
if entity.ty in (Entity.USER, Entity.BOT):
|
||||
return _tl.InputPeerUser(entity.id, entity.access_hash)
|
||||
return _tl.InputPeerUser(entity.id, entity.hash)
|
||||
elif entity.ty in (Entity.GROUP):
|
||||
return _tl.InputPeerChat(peer.chat_id)
|
||||
elif entity.ty in (Entity.CHANNEL, Entity.MEGAGROUP, Entity.GIGAGROUP):
|
||||
return _tl.InputPeerChannel(entity.id, entity.access_hash)
|
||||
return _tl.InputPeerChannel(entity.id, entity.hash)
|
||||
|
||||
# Only network left to try
|
||||
if isinstance(peer, str):
|
||||
|
Reference in New Issue
Block a user