Search code examples
xmppsmack

How to cancel MUC invitation with Smack 4.2?


Let assume that room owner invite to other smack user when this user is offline. After room owner decided to kick smack user. By the way smack user is still offline. I think, I must cancel invitation. when the above scenario is realized, smack throw exception "not allowed user". Exactly at this point (actually i catch this exception), I want to cancel invitation and update room info node. How can I this?


Solution

  • You can't revoke directly the invitation. However, "kick" is like a temporary ban (an Admin can force an user to leave the MUC) that is not what are you looking for.

    You are looking for a permanent BAN, that's the equivalent to set the "privileges" of ROOM OUTCAST to an user.

    So you can try to put the user in the Outcast list: when he will accept the invitation, he will not found the grants to join.