diff --git a/src/Infrastructure/BotSharp.Core/Evaluations/Services/EvaluatingService.Evaluate.cs b/src/Infrastructure/BotSharp.Core/Evaluations/Services/EvaluatingService.Evaluate.cs index 3af90023..c122d552 100644 --- a/src/Infrastructure/BotSharp.Core/Evaluations/Services/EvaluatingService.Evaluate.cs +++ b/src/Infrastructure/BotSharp.Core/Evaluations/Services/EvaluatingService.Evaluate.cs @@ -99,17 +99,7 @@ public partial class EvaluatingService break; } - - if (curBotMsg.IsEqualTo(prevBotMsg)) - { - duplicateCount++; - } - else - { - duplicateCount = 0; - } - - + duplicateCount = curBotMsg.IsEqualTo(prevBotMsg) ? duplicateCount + 1 : 0; if (duplicateCount >= request.Chat.DuplicateLimit) { break;