♻️ Refactor the notification service to use gorush as push service
This commit is contained in:
@ -9,8 +9,6 @@ using SystemClock = NodaTime.SystemClock;
|
||||
namespace DysonNetwork.Sphere.Connection.Handlers;
|
||||
|
||||
public class MessageReadHandler(
|
||||
AppDatabase db,
|
||||
ICacheService cache,
|
||||
ChatRoomService crs,
|
||||
FlushBufferService buffer
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DysonNetwork.Sphere.Connection.Handlers;
|
||||
|
||||
public class MessageTypingHandler(AppDatabase db, ChatRoomService crs, ICacheService cache) : IWebSocketPacketHandler
|
||||
public class MessageTypingHandler(ChatRoomService crs) : IWebSocketPacketHandler
|
||||
{
|
||||
public string PacketType => "messages.typing";
|
||||
|
||||
|
@ -91,8 +91,7 @@ public class WebSocketController(WebSocketService ws, ILogger<WebSocketContext>
|
||||
);
|
||||
|
||||
var packet = WebSocketPacket.FromBytes(buffer[..receiveResult.Count]);
|
||||
if (packet is null) continue;
|
||||
ws.HandlePacket(currentUser, connectionKey.DeviceId, packet, webSocket);
|
||||
_ = ws.HandlePacket(currentUser, connectionKey.DeviceId, packet, webSocket);
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
|
@ -14,7 +14,7 @@ public class WebSocketPacketType
|
||||
public class WebSocketPacket
|
||||
{
|
||||
public string Type { get; set; } = null!;
|
||||
public object Data { get; set; }
|
||||
public object Data { get; set; } = null!;
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user