Re: Adding contacts and seeing messenger status programatically

  •  08-01-2011, 7:49 AM

    Re: Adding contacts and seeing messenger status programatically

    Hi rgettel,
     
     
    1. I can not reproduce this problem. do you mean it shows a empty name in the contact list if the friend add by this code? Can you post some screenshots to show this issue?
     
    2.  You can get the user status by the code below
     
        CuteChat.ChatPortal portal = CuteChat.AppSystem.Instance.GetCurrentPortal();
                lock (portal)
                {
                    if (portal.IsMessengerStarted)
                    {
                        CuteChat.ChatPlaceUser user = portal.Messenger.FindUser("User:admin");

                        if (user != null)
                        {
                            // get the user status by user.OnlineStatus
                            label1.Text = user.OnlineStatus;
                        }
                    }
                }
     
     3.  Please try method Chat_OpenContact('userId'),like
     
    <a href="#" onclick="Chat_OpenContact('admin')"><img src="CuteSoft_Client/CuteChat/Images/avatar.gif">admin</a>
     
     
    Regards,
     
    ken
View Complete Thread