1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-23 13:07:59 +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:
Gaston Dombiak 2004-09-12 02:11:52 +00:00 committed by gdombiak
parent 151c904730
commit c395074c86

View file

@ -1222,11 +1222,11 @@ public class MultiUserChat {
* @throws XMPPException if an error occurs granting ownership privileges to a user.
*/
public void grantOwnership(String jid) throws XMPPException {
MUCAdmin iq = new MUCAdmin();
MUCOwner iq = new MUCOwner();
iq.setTo(room);
iq.setType(IQ.Type.SET);
// 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);
iq.addItem(item);
@ -1257,11 +1257,11 @@ public class MultiUserChat {
* @throws XMPPException if an error occurs granting ownership privileges to a user.
*/
public void revokeOwnership(String jid) throws XMPPException {
MUCAdmin iq = new MUCAdmin();
MUCOwner iq = new MUCOwner();
iq.setTo(room);
iq.setType(IQ.Type.SET);
// 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);
iq.addItem(item);
@ -1293,11 +1293,11 @@ public class MultiUserChat {
* @throws XMPPException if an error occurs granting administrator privileges to a user.
*/
public void grantAdmin(String jid) throws XMPPException {
MUCAdmin iq = new MUCAdmin();
MUCOwner iq = new MUCOwner();
iq.setTo(room);
iq.setType(IQ.Type.SET);
// 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);
iq.addItem(item);
@ -1329,11 +1329,11 @@ public class MultiUserChat {
* @throws XMPPException if an error occurs revoking administrator privileges from a user.
*/
public void revokeAdmin(String jid) throws XMPPException {
MUCAdmin iq = new MUCAdmin();
MUCOwner iq = new MUCOwner();
iq.setTo(room);
iq.setType(IQ.Type.SET);
// 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);
iq.addItem(item);