/** * Revokes a user's membership. Note that you must be an owner or admin of the room. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#revokemember">9.4 Revoking Membership</a> * @see #grantMembership(Jid, String, String) */ public final AsyncResult<IQ> revokeMembership(Jid user, String reason) { return changeAffiliation(Affiliation.NONE, user, reason); }
/** * Bans a user. Note that you must be an owner or admin of the room. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#ban">9.1 Banning a User</a> */ public final AsyncResult<IQ> banUser(Jid user, String reason) { return changeAffiliation(Affiliation.OUTCAST, user, reason); }
/** * Grants owner status to a user. Note that you must be an owner of the room. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#grantowner">10.3 Granting Owner Status</a> * @see #revokeOwnerStatus(Jid, String) */ public final AsyncResult<IQ> grantOwnerStatus(Jid user, String reason) { return changeAffiliation(Affiliation.OWNER, user, reason); }
/** * Grants membership to a user. Note that you must be an owner or admin of the room. * * @param user The user. * @param nick The nick (optional). That nick becomes the user's default nick in the room if that functionality is supported by the implementation. May be <code>null</code>. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#grantmember">9.3 Granting Membership</a> * @see #revokeMembership(Jid, String) */ public final AsyncResult<IQ> grantMembership(Jid user, String nick, String reason) { return changeAffiliation(Affiliation.MEMBER, user, nick, reason); }
/** * Grants admin status to a user. Note that you must be an owner of the room. * This method does basically the same as {@link #revokeOwnerStatus(Jid, String)}. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#grantadmin">10.6 Granting Admin Status</a> * @see #revokeAdminStatus(Jid, String) */ public final AsyncResult<IQ> grantAdminStatus(Jid user, String reason) { return changeAffiliation(Affiliation.ADMIN, user, reason); }
/** * Revokes a user's admin status. The new status of the user will be 'member'. * Note that you must be an owner of the room. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#revokeadmin">10.7 Revoking Admin Status</a> * @see #grantAdminStatus(Jid, String) */ public final AsyncResult<IQ> revokeAdminStatus(Jid user, String reason) { return changeAffiliation(Affiliation.MEMBER, user, reason); }
/** * Revokes a user's owner status. The new status of the user will be 'admin'. * Note that you must be an owner of the room. * This method does basically the same as {@link #grantAdminStatus(Jid, String)}}. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#revokeowner">10.4 Revoking Owner Status</a> * @see #grantOwnerStatus(Jid, String) */ public final AsyncResult<IQ> revokeOwnerStatus(Jid user, String reason) { return changeAffiliation(Affiliation.ADMIN, user, reason); }