Chat room subscribe

This commit is contained in:
2025-06-27 22:55:00 +08:00
parent 5dd138949e
commit 2a28948418
5 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,21 @@
using System.Net.WebSockets;
using DysonNetwork.Sphere.Chat;
namespace DysonNetwork.Sphere.Connection.Handlers;
public class MessagesUnsubscribeHandler(WebSocketService webSocketService) : IWebSocketPacketHandler
{
public string PacketType => "messages.unsubscribe";
public Task HandleAsync(
Account.Account currentUser,
string deviceId,
WebSocketPacket packet,
WebSocket socket,
WebSocketService srv
)
{
webSocketService.UnsubscribeFromChatRoom(deviceId);
return Task.CompletedTask;
}
}