diff --git a/Libraries/Core/Helpers/NotificationSendHelper.cs b/Libraries/Core/Helpers/NotificationSendHelper.cs index ff6c5ed7..f92ae7f4 100644 --- a/Libraries/Core/Helpers/NotificationSendHelper.cs +++ b/Libraries/Core/Helpers/NotificationSendHelper.cs @@ -11,7 +11,7 @@ namespace Core.Helpers; [Injectable] public class NotificationSendHelper( - IWebSocketConnectionHandler _sptWebSocketConnectionHandler, + IEnumerable _sptWebSocketConnectionHandler, HashUtil _hashUtil, SaveServer _saveServer, NotificationService _notificationService, @@ -25,7 +25,9 @@ public class NotificationSendHelper( /// public void SendMessage(string sessionID, WsNotificationEvent notificationMessage) { - var sptWebSocketConnectionHandler = _sptWebSocketConnectionHandler as SptWebSocketConnectionHandler; + var sptWebSocketConnectionHandler = _sptWebSocketConnectionHandler + .OfType() + .FirstOrDefault(wsh => wsh.GetHookUrl() == "/notifierServer/getwebsocket/"); if (sptWebSocketConnectionHandler.IsWebSocketConnected(sessionID)) {