using SptCommon.Annotations;
using Core.Models.Eft.Profile;
using Core.Models.Eft.Ws;
using Core.Models.Enums;
using Core.Servers;
using Core.Servers.Ws;
using Core.Services;
using Core.Utils;
namespace Core.Helpers;
[Injectable]
public class NotificationSendHelper(
IWebSocketConnectionHandler _sptWebSocketConnectionHandler,
HashUtil _hashUtil,
SaveServer _saveServer,
NotificationService _notificationService
)
{
///
/// Send notification message to the appropriate channel
///
///
///
public void SendMessage(string sessionID, WsNotificationEvent notificationMessage)
{
if (_sptWebSocketConnectionHandler.IsWebSocketConnected(sessionID))
{
_sptWebSocketConnectionHandler.SendMessage(sessionID, notificationMessage);
}
else
{
_notificationService.Add(sessionID, notificationMessage);
}
}
///
/// Send a message directly to the player
///
/// Session id
/// Who is sending the message to player
/// Text to send player
/// Underlying type of message being sent
public void SendMessageToPlayer(
string sessionId,
UserDialogInfo senderDetails,
string messageText,
MessageType messageType)
{
throw new NotImplementedException();
}
///
/// Helper function for SendMessageToPlayer(), get new dialog for storage in profile or find existing by sender id
///
/// Session id
/// Type of message to generate
/// Who is sending the message
/// Dialogue
protected Models.Eft.Profile.Dialogue GetDialog(string sessionId, MessageType messageType, UserDialogInfo senderDetails)
{
throw new NotImplementedException();
}
}