private void ChatController_OnAddMessage(DCL.Interface.ChatMessage obj) { if (!CommonScriptableObjects.rendererState.Get() || obj.messageType != DCL.Interface.ChatMessage.Type.PRIVATE || obj.timestamp < rendererStateTimeMark) { return; } var ownProfile = UserProfile.GetOwnUserProfile(); string userId = string.Empty; if (obj.sender != ownProfile.userId) { userId = obj.sender; } else if (obj.recipient != ownProfile.userId) { userId = obj.recipient; } if (!string.IsNullOrEmpty(userId)) { AddChatHead(userId, obj.timestamp); } }
public static void SendChatMessage(ChatMessage message) { sendChatMessageEvent.message = message; SendMessage("SendChatMessage", sendChatMessageEvent); }