From af6f9466a8e129a5c7ecd59dd9bd2e3e258efb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Fri, 2 May 2025 09:27:24 +0200 Subject: [PATCH] Misc --- .../Commands.cs | 2 +- .../MobileAuthenticatorHandler.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs index bdcca3035..8bd90450b 100644 --- a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs +++ b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs @@ -330,7 +330,7 @@ internal static class Commands { CTwoFactor_AddAuthenticator_Response? response = await mobileAuthenticatorHandler.AddAuthenticator(bot.SteamID, deviceID).ConfigureAwait(false); if (response == null) { - return bot.Commands.FormatBotResponse(Strings.WarningFailed); + return bot.Commands.FormatBotResponse(Strings.FormatWarningFailedWithError(nameof(mobileAuthenticatorHandler.AddAuthenticator))); } EResult result = (EResult) response.status; diff --git a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorHandler.cs b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorHandler.cs index ac107bd9f..160e82efa 100644 --- a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorHandler.cs +++ b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorHandler.cs @@ -76,7 +76,8 @@ internal sealed class MobileAuthenticatorHandler : ClientMsgHandler { return null; } - return response.Result == EResult.OK ? response.Body : null; + // We want to return the response even with failed EResult + return response.Body; } internal async Task FinalizeAuthenticator(ulong steamID, string activationCode, string authenticatorCode, ulong authenticatorTime) { @@ -113,6 +114,7 @@ internal sealed class MobileAuthenticatorHandler : ClientMsgHandler { return null; } - return response.Result == EResult.OK ? response.Body : null; + // We want to return the response even with failed EResult + return response.Body; } }