implement route for channel switching and use json for received data

This commit is contained in:
Infi
2024-08-25 17:06:00 +02:00
parent 1d7153fc50
commit d0802a8d7a
3 changed files with 74 additions and 15 deletions
+15 -1
View File
@@ -2,6 +2,7 @@
namespace ChatTwo.Http.MessageProtocol;
#region Outgoing
public struct SwitchChannel(string name)
{
[JsonProperty("channel")] public string Name = name;
@@ -21,4 +22,17 @@ public struct MessageResponse()
{
[JsonProperty("timestamp")] public string Timestamp = "";
[JsonProperty("messageHTML")] public string Message = "";
}
}
#endregion
#region Incoming
public struct IncomingMessage()
{
[JsonProperty("message")] public string Message = string.Empty;
}
public struct IncomingChannel()
{
[JsonProperty("channel")] public uint Channel = uint.MaxValue;
}
#endregion