Fix a bug with get_session (#76)

* Fix a bug

InputBotInlineMessageID's dc_id being the same with Client's dc_id. Closes #74

---------

Co-authored-by: KurimuzonAkuma <31959970+KurimuzonAkuma@users.noreply.github.com>
This commit is contained in:
S!R X 2024-07-08 16:50:26 +03:30 committed by GitHub
parent 31d6a28bbd
commit 0cda4f9c79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,6 +36,9 @@ async def get_session(client: "pyrogram.Client", dc_id: int) -> Session:
await session.start() await session.start()
if dc_id == await client.storage.dc_id():
return session
for _ in range(3): for _ in range(3):
exported_auth = await client.invoke( exported_auth = await client.invoke(
raw.functions.auth.ExportAuthorization( raw.functions.auth.ExportAuthorization(