From 2e136f67c1a5a3979ff1038f055615e64a592e39 Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Thu, 7 Dec 2023 21:31:34 -0600 Subject: [PATCH] Remove state auto set. --- .../Conversations/Services/ConversationStateService.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStateService.cs b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStateService.cs index cd4fe9c6..23e589b1 100644 --- a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStateService.cs +++ b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStateService.cs @@ -107,11 +107,6 @@ public class ConversationStateService : IConversationStateService, IDisposable public string GetState(string name, string defaultValue = "") { if (!_states.ContainsKey(name)) - { - _states[name] = defaultValue ?? ""; - } - - if (string.IsNullOrEmpty(_states[name])) { return defaultValue; }