Remove PackedChat

In favour of using the session entity type consistently.
This commit is contained in:
Lonami Exo
2022-02-08 11:31:24 +01:00
parent 07faa53c5a
commit 9b4808a558
8 changed files with 86 additions and 74 deletions

View File

@@ -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):