I'm working on a page where users can see lists of who is online and currently chatting and I am trying to create functionality to interact with the messenger and hitting a few road blocks.
1) I have the code in place to add a contact using:
ChatSystem.Instance.GetCurrentPortal().DataManager.AddContact(GetLoggedInUserIdentity(), userLoginID);
where GetLoggedInUserIdenty returns the current user's AppChatIdentity and userLoginID is the user id of the person to add to the contact list. This works but the added user's display name is always blank (profile picture shows up fine). How do I get the suer added with their name displayed? Adding a user through the messenger's add contact popup works correctly.
2) My page displays all online users btu I would like to show which users are currently using their messenger and which are not. In messenger this is denoted by either a green dot beside their name or a yellow clock face. How can I make this determination programatically?
3) I would like to be able to start a conversation with an online member straight from this page. How can I open a conversation with the user from an external page?