2022-08-30 15:00:58 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace SharpChat.Events {
|
|
|
|
|
public class UserConnectEvent : IChatEvent {
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public DateTimeOffset DateTime { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
2023-02-17 21:47:44 +00:00
|
|
|
|
public ChatUser Sender { get; set; }
|
2022-08-30 15:00:58 +00:00
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
2023-02-16 22:47:30 +00:00
|
|
|
|
public string ChannelName { get; set; }
|
2022-08-30 15:00:58 +00:00
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public ChatMessageFlags Flags { get; set; } = ChatMessageFlags.Log;
|
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public long SequenceId { get; set; }
|
|
|
|
|
|
|
|
|
|
public UserConnectEvent() { }
|
2023-02-17 21:47:44 +00:00
|
|
|
|
public UserConnectEvent(DateTimeOffset joined, ChatUser user, ChatChannel channel) {
|
2022-08-30 15:00:58 +00:00
|
|
|
|
DateTime = joined;
|
|
|
|
|
Sender = user;
|
2023-02-16 22:47:30 +00:00
|
|
|
|
ChannelName = channel.Name;
|
2022-08-30 15:00:58 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|