[OneBot] changed logic of QRCode Login

This commit is contained in:
Linwenxuan 2023-10-18 10:31:12 +08:00
parent ddda5cfad3
commit 63f0ffaeac
2 changed files with 5 additions and 2 deletions

View File

@ -67,8 +67,11 @@ public class LagrangeApp : IHost
await WebService.StartAsync(cancellationToken);
if (Configuration.GetValue<uint>("Account:Uin") == 0)
if (Configuration["Account:Password"] == null || Configuration["Account:Password"] == "" ||
Instance.ContextCollection.Keystore.Session.TempPassword == null)
{
Logger.LogInformation("Session expired or Password not filled in, try to login by QrCode");
var qrCode = await Instance.FetchQrCode();
if (qrCode != null)
{

View File

@ -292,7 +292,7 @@ Please use Lagrange.Core responsibly and in accordance with the law.
```
- Create a file named 'appsettings.json' under Lagrange.OneBot executable directory
- As the Uin is 0 here, this indicates that QRCode login is used
- As the Password is empty here, this indicates that QRCode login is used
- After the QRCode Login, write Uin back to perform EasyLogin
## Known Problem