Send messages from the server side for CuteMessenger

Last post 05-10-2011, 8:19 PM by Kenneth. 4 replies.
Sort Posts: Previous Next
  •  06-10-2009, 3:08 PM 52971

    Send messages from the server side for CuteMessenger

    Is possible to send messages from the server side to some specific Messenger, I can not find in the Methods of CuteChat one way to do it, this could be helpful to send notifications from the system to the users.
     
  •  06-11-2009, 10:24 PM 53047 in reply to 52971

    Re: Send messages from the server side for CuteMessenger

    Hi,
     
    Please test this code :
     
    1. CuteChat.ChatPortal portal=CuteChat.AppSystem.Instance.GetCurrentPortal();   
    2. lock(portal)   
    3. {   
    4.     if(portal.IsMessengerStarted)   
    5.     {   
    6.         CuteChat.ChatPlaceUser[] users=portal.Messenger.GetAllUsers();   
    7.         foreach(CuteChat.ChatPlaceUser user in users)   
    8.         {   
    9.             portal.Messenger.Manager.PushSTCMessage(user.Connection,ChatMetaData.ServerMsg_SYS_ALERT_MESSAGE,null,"Hello,World!");   
    10.         }   
    11.     }   
    12. }  

    Regards,
    Terry
     
  •  06-12-2009, 4:50 PM 53102 in reply to 53047

    Re: Send messages from the server side for CuteMessenger

    Thanks Terry, That's what I was looking for.
     
     
  •  05-10-2011, 3:43 PM 67525 in reply to 53102

    Re: Send messages from the server side for CuteMessenger

    where is ChatMetaData declared?
  •  05-10-2011, 8:19 PM 67533 in reply to 67525

    Re: Send messages from the server side for CuteMessenger

    Hi soyemil,
     
    Namespace CuteChat
     
    CuteChat.ChatMetaData.ServerMsg_SYS_ALERT_MESSAGE
     
    Regards,
     
    ken
     
View as RSS news feed in XML