/// <summary> /// Method to send the new message to the chat. /// </summary> public void SendMessage() { if (!string.IsNullOrEmpty(input.text)) { MessageData data = new MessageData(chatController.GetRandomMember(), input.text, DateTime.Now.ToString("T"), true); chatController.AddMessage(data); input.text = ""; } }
// Manage Chat // // Add a Message to the Chat public void AddChatMessage(string message) => chatController.AddMessage(message);