From 4260e927378959df925088ccba35f63af1f9ce10 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Mon, 4 Nov 2024 16:51:02 -0600 Subject: [PATCH] minor change --- .../BotSharp.Plugin.ChatHub/Hooks/ChatHubConversationHook.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugins/BotSharp.Plugin.ChatHub/Hooks/ChatHubConversationHook.cs b/src/Plugins/BotSharp.Plugin.ChatHub/Hooks/ChatHubConversationHook.cs index a99538ab..b282fa53 100644 --- a/src/Plugins/BotSharp.Plugin.ChatHub/Hooks/ChatHubConversationHook.cs +++ b/src/Plugins/BotSharp.Plugin.ChatHub/Hooks/ChatHubConversationHook.cs @@ -165,8 +165,8 @@ public class ChatHubConversationHook : ConversationHookBase #region Private methods private bool AllowSendingMessage() { - var sidecar = _services.GetRequiredService(); - return !sidecar.IsEnabled(); + var sidecar = _services.GetService(); + return sidecar == null || !sidecar.IsEnabled(); } private async Task InitClientConversation(ConversationViewModel conversation)