Update: Text Channel Stuff
Bugs: Files don't work Bugs: Video In-Line don't work Added: idk, everything?
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace RelayShared.Services;
|
||||
namespace RelayShared.Services;
|
||||
|
||||
//TODO: review name of file, potentially rename for Encryption services rather than sockets
|
||||
|
||||
@@ -16,6 +16,8 @@ public sealed class SocketRtcSignalMessage
|
||||
public sealed class SocketEncryptedMessage
|
||||
{
|
||||
public SignalType Type { get; set; } = SignalType.EncryptedChat;
|
||||
public string MessageId { get; set; } = string.Empty;
|
||||
|
||||
public string SenderUsername { get; set; } = string.Empty;
|
||||
public string RecipientUsername { get; set; } = string.Empty;
|
||||
public string ChannelId { get; set; } = string.Empty;
|
||||
@@ -23,6 +25,38 @@ public sealed class SocketEncryptedMessage
|
||||
public string Nonce { get; set; } = string.Empty;
|
||||
public string Tag { get; set; } = string.Empty;
|
||||
public string EncryptedKey { get; set; } = string.Empty;
|
||||
public bool IsEdited { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
|
||||
public sealed class SocketMessageDeletedEvent
|
||||
{
|
||||
public SignalType Type { get; set; } = SignalType.MessageDeleted;
|
||||
public string MessageId { get; set; } = string.Empty;
|
||||
public string ChannelId { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class SocketTypingEvent
|
||||
{
|
||||
public SignalType Type { get; set; } = SignalType.TypingIndicator;
|
||||
public string Username { get; set; } = string.Empty;
|
||||
public string ChannelId { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class SocketEditHistoryEntry
|
||||
{
|
||||
public string CipherText { get; set; } = string.Empty;
|
||||
public string Nonce { get; set; } = string.Empty;
|
||||
public string Tag { get; set; } = string.Empty;
|
||||
public string EncryptedKey { get; set; } = string.Empty;
|
||||
public DateTime EditedAt { get; set; }
|
||||
}
|
||||
|
||||
public sealed class SocketEditHistoryResponse
|
||||
{
|
||||
public SignalType Type { get; set; } = SignalType.EditHistory;
|
||||
public string MessageId { get; set; } = string.Empty;
|
||||
public List<SocketEditHistoryEntry> Entries { get; set; } = [];
|
||||
}
|
||||
|
||||
public sealed class ServerPublicKeyMessage
|
||||
@@ -44,5 +78,11 @@ public enum SignalType
|
||||
ServerPublicKey,
|
||||
EncryptedSignal,
|
||||
EncryptedChat,
|
||||
ClientEncryptedChat
|
||||
}
|
||||
ClientEncryptedChat,
|
||||
ClientEditMessage,
|
||||
ClientDeleteMessage,
|
||||
MessageEdited,
|
||||
MessageDeleted,
|
||||
TypingIndicator,
|
||||
EditHistory
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user