18 lines
519 B
C#
18 lines
519 B
C#
|
using System.Text.Json.Serialization;
|
|||
|
|
|||
|
namespace SharpChat.Events {
|
|||
|
[ChatEventDataFor("user:status")]
|
|||
|
public class UserStatusUpdateEventData : ChatEventData {
|
|||
|
[JsonPropertyName("status")]
|
|||
|
public UserStatus Status { get; }
|
|||
|
|
|||
|
[JsonPropertyName("text")]
|
|||
|
public string? Text { get; }
|
|||
|
|
|||
|
public UserStatusUpdateEventData(UserStatus status, string? text = null) {
|
|||
|
Status = status;
|
|||
|
Text = string.IsNullOrWhiteSpace(text) ? null : text;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|