, @SpecCompliant(spec="xep-0060", section="6.1.3.11", status= SpecCompliant.ComplianceStatus.FINISHED, coverage = SpecCompliant.ComplianceCoverage.COMPLETE)
})
protected Stanza handleSet(IQStanza stanza,
ServerRuntimeContext serverRuntimeContext,
SessionContext sessionContext) {
Entity serverJID = serviceConfiguration.getServerJID();
CollectionNode root = serviceConfiguration.getRootNode();
Entity sender = extractSenderJID(stanza, sessionContext);
Entity subJID = null;
String iqStanzaID = stanza.getAttributeValue("id");
StanzaBuilder sb = StanzaBuilder.createIQStanza(serverJID, sender, IQStanzaType.RESULT, iqStanzaID);
sb.startInnerElement("pubsub", NamespaceURIs.XEP0060_PUBSUB);
XMLElement sub = stanza.getFirstInnerElement().getFirstInnerElement(); // pubsub/subscribe
String strSubJID = sub.getAttributeValue("jid"); // MUST
try {
subJID = EntityImpl.parse(strSubJID);
} catch (EntityFormatException e) {
return errorStanzaGenerator.generateJIDMalformedErrorStanza(sender, serverJID, stanza);
}
if(!sender.getBareJID().equals(subJID.getBareJID())) {
// error condition 1 (6.1.3)
return errorStanzaGenerator.generateJIDDontMatchErrorStanza(sender, serverJID, stanza);
}
String nodeName = extractNodeName(stanza);