Re: Send mass message to all users

  •  05-09-2011, 9:13 PM

    Re: Send mass message to all users

    Hi soyemil,
     
    The code below shows you how to send a message to all online users of CuteMessenger.
     
       CuteChat.ChatPortal portal=CuteChat.AppSystem.Instance.GetCurrentPortal();
                 lock (portal)
                 {
                     if (portal.IsMessengerStarted)
                     {
                         CuteChat.ChatPlaceUser[] users = portal.Messenger.GetAllUsers();
                         foreach (CuteChat.ChatPlaceUser user in users)
                         {
                             portal.Messenger.Manager.PushSTCMessage(user.Connection, ChatMetaData.ServerMsg_SYS_ALERT_MESSAGE, null, "Hello,World!");
                         }
                     }
                 }

     Regards,
     
    ken
View Complete Thread