Corrected omission where KfClient would not be populated with the newly retrieved token after refreshing it and get caught in a reconnect loop.

This commit is contained in:
barelyprofessional
2024-09-02 20:47:57 +08:00
parent cc19b0bb7c
commit 85bd4e3b2c

View File

@@ -126,6 +126,7 @@ public class ChatBot
await Helpers.GetMultipleValues([BuiltIn.Keys.KiwiFarmsUsername, BuiltIn.Keys.KiwiFarmsPassword]);
await _kfTokenService.PerformLogin(settings[BuiltIn.Keys.KiwiFarmsUsername].Value!,
settings[BuiltIn.Keys.KiwiFarmsPassword].Value!);
KfClient.UpdateToken(_kfTokenService.GetXfSessionCookie()!);
await _kfTokenService.SaveCookies();
_logger.Info("Successfully logged in");
}