🚑️ hotfix: qrlogin

This commit is contained in:
xtaodada 2023-02-01 13:36:41 +08:00
parent 7c00d65fd1
commit fa6a316ae6
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -38,9 +38,9 @@ async def sign_in_qrcode(
)
await client.session.start()
req = await client.invoke(pyrogram.raw.functions.auth.ImportLoginToken(token=req.token))
await client.storage.user_id(req.user.id)
await client.storage.user_id(req.authorization.user.id)
await client.storage.is_bot(False)
return pyrogram.types.User._parse(client, req.user)
return pyrogram.types.User._parse(client, req.authorization.user)
elif isinstance(req, pyrogram.raw.types.auth.LoginTokenSuccess):
await client.storage.user_id(req.authorization.user.id)
await client.storage.is_bot(False)