From 64ce7a15c4390aa8c6b50fbee169e0342245085a Mon Sep 17 00:00:00 2001 From: JustArchi Date: Wed, 21 Apr 2021 23:15:20 +0200 Subject: [PATCH] Correct success when using waitIfNeeded with no IDs specified We return success if we handled anything in this case --- ArchiSteamFarm/Actions.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Actions.cs b/ArchiSteamFarm/Actions.cs index 3c866ec07..5762d4881 100644 --- a/ArchiSteamFarm/Actions.cs +++ b/ArchiSteamFarm/Actions.cs @@ -159,7 +159,9 @@ namespace ArchiSteamFarm { } } - return (!waitIfNeeded, handledConfirmations?.Values, !waitIfNeeded ? string.Format(CultureInfo.CurrentCulture, Strings.BotHandledConfirmations, handledConfirmations?.Count ?? 0) : string.Format(CultureInfo.CurrentCulture, Strings.ErrorRequestFailedTooManyTimes, WebBrowser.MaxTries)); + bool success = !waitIfNeeded || ((handledConfirmations?.Count > 0) && ((acceptedCreatorIDs == null) || (acceptedCreatorIDs.Count == 0))); + + return (success, handledConfirmations?.Values, success ? string.Format(CultureInfo.CurrentCulture, Strings.BotHandledConfirmations, handledConfirmations?.Count ?? 0) : string.Format(CultureInfo.CurrentCulture, Strings.ErrorRequestFailedTooManyTimes, WebBrowser.MaxTries)); } [PublicAPI]