AnsweredAssumed Answered

how to add user to which room is exist

Question asked by flyJocker on Jun 10, 2015
Latest reply on Jun 10, 2015 by flyJocker

this is my code:

public static void joinRoom(String userId, String roomId){

  try {

   sm.openConnection();

   sm.loginUser(userId, userId);

   MultiUserChatManager mucm = MultiUserChatManager.getInstanceFor(sm.getConnection());

   MultiUserChat muc = mucm.getMultiUserChat(roomId + "@" + SERVICE_ROOM_NAME + "." + SERVICE_NAME);

   muc.invite(userId + "@" + SERVICE_NAME, "");

   sm.closeConnection();

  } catch (NotConnectedException e) {

   e.printStackTrace();

  }

}

but it just join room,not add a user to room!

i'm not want add user by invite listener!

becus the room just us can see!

Outcomes