/// <summary> /// User chat action received event /// </summary> /// <param name="userID">User ID</param> /// <param name="action">Action</param> private void UserChatActionReceivedEvent(int userID, string action) { if (users.IsIDValid(userID)) { IUser user = users[userID]; chatMessagesActions.Add(new ChatMessageAction(user, action, true)); OnUserChatActionReceived?.Invoke(user, action); } }
/// <summary> /// Send chat action /// </summary> /// <param name="action">Action</param> public void SendChatAction(string action) { if ((action != null) && (User != null)) { string trimmed_action = action.Trim(); if (trimmed_action.Length > 0) { chatMessagesActions.Add(new ChatMessageAction(User, trimmed_action, true)); OnUserChatActionReceived?.Invoke(User, trimmed_action); } } }