Commit 4e33aa0d authored by Dave Cridland's avatar Dave Cridland

Merge pull request #192 from nobelium/OF-858

OF-858: Auto create new nodes in PEP
parents 8e9fe62b eacb38f9
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
package org.jivesoftware.openfire.pep; package org.jivesoftware.openfire.pep;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
...@@ -278,7 +279,14 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider, ...@@ -278,7 +279,14 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
* in the server's disco#info result (as per section 4 of XEP-0163). * in the server's disco#info result (as per section 4 of XEP-0163).
*/ */
public Iterator<String> getFeatures() { public Iterator<String> getFeatures() {
return XMPPServer.getInstance().getPubSubModule().getFeatures(null, null, null); Iterator<String> it = XMPPServer.getInstance().getPubSubModule().getFeatures(null, null, null);
ArrayList<String> features = new ArrayList<String>();
while (it.hasNext()) {
features.add(it.next());
}
// Auto Creation of nodes is supported in PEP
features.add("http://jabber.org/protocol/pubsub#auto-create");
return features.iterator();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment