Reintroduces separate contexts for users, channels, connections (now split into sessions and connections) and user-channel associations. It builds which is as much assurance as I can give about the stability of this commit, but its also the bare minimum of what i like to commit sooooo A lot of things still need to be broadcast through events throughout the application in order to keep states consistent but we'll cross that bridge when we get to it. I really need to stop using that phrase thingy, I'm overusing it.
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using SharpChat.Users;
|
|
|
|
namespace SharpChat.Events;
|
|
|
|
public class MessageCreateEvent(
|
|
long msgId,
|
|
string channelName,
|
|
string senderId,
|
|
string senderName,
|
|
ColourInheritable senderColour,
|
|
int senderRank,
|
|
string senderNickName,
|
|
UserPermissions senderPerms,
|
|
DateTimeOffset msgCreated,
|
|
string msgText,
|
|
bool isPrivate,
|
|
bool isAction,
|
|
bool isBroadcast
|
|
) : ChatEvent {
|
|
public long MessageId { get; } = msgId;
|
|
public string ChannelName { get; } = channelName;
|
|
public string SenderId { get; } = senderId;
|
|
public string SenderName { get; } = senderName;
|
|
public ColourInheritable SenderColour { get; } = senderColour;
|
|
public int SenderRank { get; } = senderRank;
|
|
public string SenderNickName { get; } = senderNickName;
|
|
public UserPermissions SenderPerms { get; } = senderPerms;
|
|
public DateTimeOffset MessageCreated { get; } = msgCreated;
|
|
public string MessageText { get; } = msgText;
|
|
public bool IsPrivate { get; } = isPrivate;
|
|
public bool IsAction { get; } = isAction;
|
|
public bool IsBroadcast { get; } = isBroadcast;
|
|
}
|