mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +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:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if not self._session.user:
|
me = await self.get_me()
|
||||||
me = await self.get_me()
|
assert me is not None
|
||||||
assert me is not None
|
self._chat_hashes.set_self_user(me.id, me.bot)
|
||||||
self._session.user = SessionUser(
|
self._session.user = SessionUser(
|
||||||
id=me.id, dc=self._sender.dc_id, bot=me.bot, username=me.username
|
id=me.id, dc=self._sender.dc_id, bot=me.bot, username=me.username
|
||||||
)
|
)
|
||||||
self._chat_hashes.set_self_user(me.id, me.bot)
|
|
||||||
|
|
||||||
self._dispatcher = asyncio.create_task(dispatcher(self))
|
self._dispatcher = asyncio.create_task(dispatcher(self))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user