Add pre-testing version of the webinterface

This commit is contained in:
Infi
2024-08-24 03:05:33 +02:00
parent 117d9fc45c
commit 5e93732183
27 changed files with 1498 additions and 129 deletions
@@ -0,0 +1,21 @@
using Newtonsoft.Json;
namespace ChatTwo.Http.MessageProtocol;
public struct MessageResponse()
{
[JsonProperty("timestamp")] public string Timestamp = "";
[JsonProperty("messageHTML")] public string Message = "";
}
public class WebSocketNewMessage(MessageResponse[] messages) : BaseOutboundMessage(MessageName)
{
private const string MessageName = "chat-message";
[JsonProperty("messages")] public MessageResponse[] Messages { get; set; } = messages;
}
public class BaseOutboundMessage(string messageType)
{
[JsonProperty("messageType")] public string MessageType { get; set; } = messageType;
}