MUC how to accept invites?

Hi,

I am using smack 4.1.0 rc1 version in android.

So i can invite any user from below code.

MultiUserChat multiUserChat = multiUserChatManager.getMultiUserChat(groupName + “@muc.” + ChatController.HOST);

multiUserChat.invite("user3@host.org/Smack", "Meet me in this excellent room");

But how to accept that invite at other end.

Let’s say

User1 invites User2 for groupchat, how does user2 accept it?

I m following this link http://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/ muc.html but as i m using 4.1.0 rc1 there is no

listener like "addInvitationListener".

Please suggest me the correct way.

Why not try

MultiUserChat.addInvitationListener(getNativeConnection(), new InvitationListener() { … });

I couldn’t find that method.

Below are the methods that i get.

multiUserChat.addInvitationRejectionListener()

multiUserChat.addMessageListener()

multiUserChat.addParticipantListener()

multiUserChat.addParticipantStatusListener()

multiUserChat.addPresenceInterceptor()

multiUserChat.addSubjectUpdatedListener()

multiUserChat.addUserStatusListener()

Any idea?

You are right, in smack 4.1.0 there is no addInvitationListener in MultiUserChat.

This function is moved to the MultiUserChatManager, it has no relation to a specific instance of a MultiUserChat, so it was a static and is now a function of the manager.