I am using Smack library for XMPP, but getting bad-request error, when trying to invite user and giving him permission of Admin (When I created a room).
Code :
try{
muc.grantMembership(userId);
} catch (XMPPException.XMPPErrorException e) {
e.printStackTrace();
} catch (SmackException.NoResponseException e) {
e.printStackTrace();
}
muc.invite(userId, "Join a group chat");
Please help me to solve this issue. Thanks