From 19c8c5e401f9f6770054f8c2683f4b39cc19954e Mon Sep 17 00:00:00 2001 From: Archangel Date: Tue, 6 May 2025 14:50:22 +0200 Subject: [PATCH] Use SptWebSocketConnectionHandler directly --- .../Helpers/NotificationSendHelper.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Helpers/NotificationSendHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/NotificationSendHelper.cs index 921089bd..3b477876 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/NotificationSendHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/NotificationSendHelper.cs @@ -11,7 +11,7 @@ namespace SPTarkov.Server.Core.Helpers; [Injectable] public class NotificationSendHelper( - IEnumerable _sptWebSocketConnectionHandler, + SptWebSocketConnectionHandler _sptWebSocketConnectionHandler, HashUtil _hashUtil, SaveServer _saveServer, NotificationService _notificationService, @@ -25,13 +25,9 @@ public class NotificationSendHelper( /// public void SendMessage(string sessionID, WsNotificationEvent notificationMessage) { - var sptWebSocketConnectionHandler = _sptWebSocketConnectionHandler - .OfType() - .FirstOrDefault(wsh => wsh.GetHookUrl() == "/notifierServer/getwebsocket/"); - - if (sptWebSocketConnectionHandler.IsWebSocketConnected(sessionID)) + if (_sptWebSocketConnectionHandler.IsWebSocketConnected(sessionID)) { - sptWebSocketConnectionHandler.SendMessage(sessionID, notificationMessage); + _sptWebSocketConnectionHandler.SendMessage(sessionID, notificationMessage); } else {