private static void FakePrivateChatMessage(IChatController controller, string sender, string recipient, string message) { if (!UserProfileController.userProfilesCatalog.Get(recipient)) { var model = new UserProfileModel() { userId = recipient, name = recipient + "-name", }; UserProfileController.i.AddUserProfileToCatalog(model); } if (!UserProfileController.userProfilesCatalog.Get(sender)) { var model = new UserProfileModel() { userId = sender, name = sender + "-name", }; UserProfileController.i.AddUserProfileToCatalog(model); } var msg = new ChatMessage() { body = message, sender = sender, recipient = recipient, messageType = ChatMessage.Type.PRIVATE, timestamp = 1000 }; controller.AddMessageToChatWindow(JsonUtility.ToJson(msg)); }