From dc6888c0012f4a91370b25c033b839680d48b511 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Mon, 24 Jun 2024 17:21:41 -0500 Subject: [PATCH] minor change --- .../BotSharp.Core/Files/Hooks/AttachmentProcessingHook.cs | 2 -- src/Plugins/BotSharp.Plugin.ChatHub/WebSocketsMiddleware.cs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/Files/Hooks/AttachmentProcessingHook.cs b/src/Infrastructure/BotSharp.Core/Files/Hooks/AttachmentProcessingHook.cs index 50088679..4b70fd73 100644 --- a/src/Infrastructure/BotSharp.Core/Files/Hooks/AttachmentProcessingHook.cs +++ b/src/Infrastructure/BotSharp.Core/Files/Hooks/AttachmentProcessingHook.cs @@ -4,7 +4,6 @@ namespace BotSharp.Core.Files.Hooks; public class AttachmentProcessingHook : AgentHookBase { - private readonly IServiceProvider _services; private static string TOOL_ASSISTANT = Guid.Empty.ToString(); public override string SelfId => string.Empty; @@ -12,7 +11,6 @@ public class AttachmentProcessingHook : AgentHookBase public AttachmentProcessingHook(IServiceProvider services, AgentSettings settings) : base(services, settings) { - _services = services; } public override void OnAgentLoaded(Agent agent) diff --git a/src/Plugins/BotSharp.Plugin.ChatHub/WebSocketsMiddleware.cs b/src/Plugins/BotSharp.Plugin.ChatHub/WebSocketsMiddleware.cs index 77370893..fb65f150 100644 --- a/src/Plugins/BotSharp.Plugin.ChatHub/WebSocketsMiddleware.cs +++ b/src/Plugins/BotSharp.Plugin.ChatHub/WebSocketsMiddleware.cs @@ -36,7 +36,7 @@ public class WebSocketsMiddleware { var regexes = new List { - new Regex(@"/conversation/[a-z0-9-]+/message/[a-z0-9-]+/[a-z]+/file/[a-z0-9-]+/[a-z0-9-]+", RegexOptions.IgnoreCase), + new Regex(@"/conversation/(.*?)/message/(.*?)/(.*?)/file/(.*?)/(.*?)", RegexOptions.IgnoreCase), new Regex(@"/user/avatar", RegexOptions.IgnoreCase) };