internal static ProxyChatMessage CreateMessageByUser(ChatMessage message, ChatUser mUser) { ProxyChatMessage result = new ProxyChatMessage(message, mUser.Equals(message.Sender)) { MessageType = MessageType.Default }; bool?isMentionedUser = message.Message.MentionedUsers?.Contains(mUser); if (isMentionedUser != null && (bool)isMentionedUser) { result.MessageType = MessageType.Mention; } return(result); }
private void AddMessage(ChatMessage message, Room room) { RoomsManager.AddMessage(ProxyChatMessage.CreateMessageByUser(message, mUser), room); }