I am developing chat application with xmpp. I have created group using MUC and sent invitation to other user. but i don't know how to accept and decline invitation.
here is my code to send invitation :
EntityBareJid userInviteJID = JidCreate.entityBareFrom("user2@servicename");
muc2.invite(userInviteJID, "Meet me in this excellent room");
I have tried MultiUserChat.decline(conn, room, inviter.asBareJid()s, "I'm busy right now");
method inside invitationReceived() method. but the problem is MultiUserChat.decline() method gives error :
can not resolve method decline()
Can anyone help me?
I found the answer for decline invitation.
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.
But what to do for accept invitation? Anyone can answer me, please ?
you need to auto join while getting an invitation, here is code while a connection is done.