Removed Old Models, extended ChatMessage to json

This commit is contained in:
Patrick Hellebrand
2021-09-22 14:09:26 +02:00
parent f2202e6aa7
commit 0c5579198f
12 changed files with 20 additions and 393 deletions

View File

@@ -6,20 +6,18 @@ namespace PolyChat.Models
{
public class ChatMessage
{
private string Origin;
private string Type;
private string Content;
private DateTime TimeStamp;
public string Origin;
public string Type;
public string Content;
public DateTime TimeStamp;
public readonly bool Foreign;
//
public readonly string Ip;
public ChatMessage(string content = "", string origin = "Unknown", string ip = "127.0.0.1")
public ChatMessage(string origin, string type, string content)
{
Origin = origin;
TimeStamp = DateTime.Now;
Type = type;
Content = content;
Ip = ip;
// no json = my messages
Foreign = false;
Debug.WriteLine("Created Message: " + ToString());