This commit is contained in:
Łukasz Domeradzki
2025-05-02 09:27:24 +02:00
parent 2ee53d8318
commit af6f9466a8
2 changed files with 5 additions and 3 deletions

View File

@@ -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;

View File

@@ -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<CTwoFactor_FinalizeAddAuthenticator_Response?> 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;
}
}