mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Fix self_user setting in chat_hashes (#4402)
This commit is contained in:
parent
26c32f31d2
commit
65a4a96dbc
|
@ -190,13 +190,12 @@ async def connect(self: Client) -> None:
|
|||
except Exception:
|
||||
pass
|
||||
else:
|
||||
if not self._session.user:
|
||||
me = await self.get_me()
|
||||
assert me is not None
|
||||
self._session.user = SessionUser(
|
||||
id=me.id, dc=self._sender.dc_id, bot=me.bot, username=me.username
|
||||
)
|
||||
self._chat_hashes.set_self_user(me.id, me.bot)
|
||||
me = await self.get_me()
|
||||
assert me is not None
|
||||
self._chat_hashes.set_self_user(me.id, me.bot)
|
||||
self._session.user = SessionUser(
|
||||
id=me.id, dc=self._sender.dc_id, bot=me.bot, username=me.username
|
||||
)
|
||||
|
||||
self._dispatcher = asyncio.create_task(dispatcher(self))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user