✨ Chat subscribe fixes and status update
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using DysonNetwork.Shared.Models;
|
||||
using NodaTime;
|
||||
|
||||
namespace DysonNetwork.Shared.Stream;
|
||||
@@ -5,7 +6,16 @@ namespace DysonNetwork.Shared.Stream;
|
||||
public class AccountDeletedEvent
|
||||
{
|
||||
public static string Type => "account_deleted";
|
||||
|
||||
|
||||
public Guid AccountId { get; set; } = Guid.NewGuid();
|
||||
public Instant DeletedAt { get; set; } = SystemClock.Instance.GetCurrentInstant();
|
||||
}
|
||||
}
|
||||
|
||||
public class AccountStatusUpdatedEvent
|
||||
{
|
||||
public static string Type => "account_status_updated";
|
||||
|
||||
public Guid AccountId { get; set; }
|
||||
public SnAccountStatus Status { get; set; } = new();
|
||||
public Instant UpdatedAt { get; set; } = SystemClock.Instance.GetCurrentInstant();
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
using NodaTime;
|
||||
|
||||
namespace DysonNetwork.Shared.Stream;
|
||||
|
||||
public class WebSocketPacketEvent
|
||||
@@ -10,3 +12,23 @@ public class WebSocketPacketEvent
|
||||
public string DeviceId { get; set; } = null!;
|
||||
public byte[] PacketBytes { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class WebSocketConnectedEvent
|
||||
{
|
||||
public static string Type => "websocket_connected";
|
||||
|
||||
public Guid AccountId { get; set; }
|
||||
public string DeviceId { get; set; } = null!;
|
||||
public Instant ConnectedAt { get; set; } = SystemClock.Instance.GetCurrentInstant();
|
||||
public bool IsOffline { get; set; } = false;
|
||||
}
|
||||
|
||||
public class WebSocketDisconnectedEvent
|
||||
{
|
||||
public static string Type => "websocket_disconnected";
|
||||
|
||||
public Guid AccountId { get; set; }
|
||||
public string DeviceId { get; set; } = null!;
|
||||
public Instant DisconnectedAt { get; set; } = SystemClock.Instance.GetCurrentInstant();
|
||||
public bool IsOffline { get; set; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user