mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 04:22:05 +01:00
Fixes incorrect namespace for granting and revoking admin/owner privileges.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2379 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
151c904730
commit
c395074c86
1 changed files with 8 additions and 8 deletions
|
@ -1222,11 +1222,11 @@ public class MultiUserChat {
|
||||||
* @throws XMPPException if an error occurs granting ownership privileges to a user.
|
* @throws XMPPException if an error occurs granting ownership privileges to a user.
|
||||||
*/
|
*/
|
||||||
public void grantOwnership(String jid) throws XMPPException {
|
public void grantOwnership(String jid) throws XMPPException {
|
||||||
MUCAdmin iq = new MUCAdmin();
|
MUCOwner iq = new MUCOwner();
|
||||||
iq.setTo(room);
|
iq.setTo(room);
|
||||||
iq.setType(IQ.Type.SET);
|
iq.setType(IQ.Type.SET);
|
||||||
// Set the affiliation to "owner". This will grant a user's ownership
|
// Set the affiliation to "owner". This will grant a user's ownership
|
||||||
MUCAdmin.Item item = new MUCAdmin.Item("owner", null);
|
MUCOwner.Item item = new MUCOwner.Item("owner");
|
||||||
item.setJid(jid);
|
item.setJid(jid);
|
||||||
iq.addItem(item);
|
iq.addItem(item);
|
||||||
|
|
||||||
|
@ -1257,11 +1257,11 @@ public class MultiUserChat {
|
||||||
* @throws XMPPException if an error occurs granting ownership privileges to a user.
|
* @throws XMPPException if an error occurs granting ownership privileges to a user.
|
||||||
*/
|
*/
|
||||||
public void revokeOwnership(String jid) throws XMPPException {
|
public void revokeOwnership(String jid) throws XMPPException {
|
||||||
MUCAdmin iq = new MUCAdmin();
|
MUCOwner iq = new MUCOwner();
|
||||||
iq.setTo(room);
|
iq.setTo(room);
|
||||||
iq.setType(IQ.Type.SET);
|
iq.setType(IQ.Type.SET);
|
||||||
// Set the affiliation to "admin". This will revoke a user's ownership
|
// Set the affiliation to "admin". This will revoke a user's ownership
|
||||||
MUCAdmin.Item item = new MUCAdmin.Item("admin", null);
|
MUCOwner.Item item = new MUCOwner.Item("admin");
|
||||||
item.setJid(jid);
|
item.setJid(jid);
|
||||||
iq.addItem(item);
|
iq.addItem(item);
|
||||||
|
|
||||||
|
@ -1293,11 +1293,11 @@ public class MultiUserChat {
|
||||||
* @throws XMPPException if an error occurs granting administrator privileges to a user.
|
* @throws XMPPException if an error occurs granting administrator privileges to a user.
|
||||||
*/
|
*/
|
||||||
public void grantAdmin(String jid) throws XMPPException {
|
public void grantAdmin(String jid) throws XMPPException {
|
||||||
MUCAdmin iq = new MUCAdmin();
|
MUCOwner iq = new MUCOwner();
|
||||||
iq.setTo(room);
|
iq.setTo(room);
|
||||||
iq.setType(IQ.Type.SET);
|
iq.setType(IQ.Type.SET);
|
||||||
// Set the affiliation to "admin". This will grant administrator privileges
|
// Set the affiliation to "admin". This will grant administrator privileges
|
||||||
MUCAdmin.Item item = new MUCAdmin.Item("admin", null);
|
MUCOwner.Item item = new MUCOwner.Item("admin");
|
||||||
item.setJid(jid);
|
item.setJid(jid);
|
||||||
iq.addItem(item);
|
iq.addItem(item);
|
||||||
|
|
||||||
|
@ -1329,11 +1329,11 @@ public class MultiUserChat {
|
||||||
* @throws XMPPException if an error occurs revoking administrator privileges from a user.
|
* @throws XMPPException if an error occurs revoking administrator privileges from a user.
|
||||||
*/
|
*/
|
||||||
public void revokeAdmin(String jid) throws XMPPException {
|
public void revokeAdmin(String jid) throws XMPPException {
|
||||||
MUCAdmin iq = new MUCAdmin();
|
MUCOwner iq = new MUCOwner();
|
||||||
iq.setTo(room);
|
iq.setTo(room);
|
||||||
iq.setType(IQ.Type.SET);
|
iq.setType(IQ.Type.SET);
|
||||||
// Set the affiliation to "member". This will revoke a user's ownership
|
// Set the affiliation to "member". This will revoke a user's ownership
|
||||||
MUCAdmin.Item item = new MUCAdmin.Item("member", null);
|
MUCOwner.Item item = new MUCOwner.Item("member");
|
||||||
item.setJid(jid);
|
item.setJid(jid);
|
||||||
iq.addItem(item);
|
iq.addItem(item);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue