Fix utils.get_peer not handling Self in get_messages

This commit is contained in:
Lonami Exo
2020-10-23 19:02:43 +02:00
parent 44e2ef6c79
commit 1a2e09487c
3 changed files with 7 additions and 3 deletions

View File

@@ -463,6 +463,10 @@ class UserMethods:
.format(peer)
)
async def _get_peer(self: 'TelegramClient', peer: 'hints.EntityLike'):
i, cls = utils.resolve_id(await self.get_peer_id(peer))
return cls(i)
async def get_peer_id(
self: 'TelegramClient',
peer: 'hints.EntityLike',