From dd16c8280ea92c64e78e241ef164e6e9faaaf197 Mon Sep 17 00:00:00 2001 From: Linwenxuan Date: Tue, 26 Mar 2024 20:52:50 +0800 Subject: [PATCH] [Core] Fixed Session Login --- KonataNT/Core/BaseClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KonataNT/Core/BaseClient.cs b/KonataNT/Core/BaseClient.cs index be846eb..2c3bf07 100644 --- a/KonataNT/Core/BaseClient.cs +++ b/KonataNT/Core/BaseClient.cs @@ -60,6 +60,8 @@ internal BaseClient(BotKeystore keystore, BotConfig config) public async Task<(string Url, byte[] Image)?> FetchQrCode() { + await PacketHandler.Connect(); + if (KeyStore.D2.Length != 0) { if (DateTime.Now - KeyStore.SessionTime > TimeSpan.FromDays(15)) @@ -80,8 +82,6 @@ internal BaseClient(BotKeystore keystore, BotConfig config) } } - await PacketHandler.Connect(); - var tlv = new TlvPacker(KeyStore, AppInfo); var body = new BinaryPacket() .WriteUshort(0)