summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/isode/stroke/muc/MUCImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/isode/stroke/muc/MUCImpl.java b/src/com/isode/stroke/muc/MUCImpl.java
index 26be309..2a45926 100644
--- a/src/com/isode/stroke/muc/MUCImpl.java
+++ b/src/com/isode/stroke/muc/MUCImpl.java
@@ -106,7 +106,9 @@ public class MUCImpl extends MUC {
106 /** 106 /**
107 * Change the affiliation of the given Jabber ID. 107 * Change the affiliation of the given Jabber ID.
108 * It must be called with the real JID, not the room JID. 108 * It must be called with the real JID, not the room JID.
109 * @param jid real jabber ID, not null 109 * @param jid real jabber ID, not null. NOTE: This method does not
110 strip any resource from the JID, as expected by XEP-0045. Callers
111 wanting to be strictly XEP-0045 conformant should pass in a bare JID
110 * @param affiliation new affiliation, not null 112 * @param affiliation new affiliation, not null
111 */ 113 */
112 @Override 114 @Override
@@ -114,7 +116,9 @@ public class MUCImpl extends MUC {
114 final MUCAdminPayload mucPayload = new MUCAdminPayload(); 116 final MUCAdminPayload mucPayload = new MUCAdminPayload();
115 MUCItem item = new MUCItem(); 117 MUCItem item = new MUCItem();
116 item.affiliation = affiliation; 118 item.affiliation = affiliation;
117 item.realJID = jid.toBare(); 119 // According to XEP-0045 the JID should be bare, but this isn't being done here because
120 // to provide support for applications where we do want to set affilations on a per resource basis
121 item.realJID = jid;
118 mucPayload.addItem(item); 122 mucPayload.addItem(item);
119 GenericRequest<MUCAdminPayload> request = new GenericRequest<MUCAdminPayload>( 123 GenericRequest<MUCAdminPayload> request = new GenericRequest<MUCAdminPayload>(
120 IQ.Type.Set, getJID(), mucPayload, iqRouter_); 124 IQ.Type.Set, getJID(), mucPayload, iqRouter_);