diff --git a/src/Plugins/BotSharp.Plugin.ChatHub/SignalRHub.cs b/src/Plugins/BotSharp.Plugin.ChatHub/SignalRHub.cs index 2cb0d1627..a261084bb 100644 --- a/src/Plugins/BotSharp.Plugin.ChatHub/SignalRHub.cs +++ b/src/Plugins/BotSharp.Plugin.ChatHub/SignalRHub.cs @@ -28,7 +28,8 @@ public override async Task OnConnectedAsync() _logger.LogInformation($"SignalR Hub: {_user.FirstName} {_user.LastName} ({Context.User.Identity.Name}) connected in {Context.ConnectionId}"); var convService = _services.GetRequiredService(); - _context.HttpContext.Request.Query.TryGetValue("conversation-id", out var conversationId); + var httpContext = Context.GetHttpContext(); + string? conversationId = httpContext?.Request?.Query["conversation-id"].FirstOrDefault(); if (!string.IsNullOrEmpty(conversationId)) {