Commit 6edf25df authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1511: Add support for Pubsub Publishing Options

parent ca167dc4
......@@ -369,6 +369,18 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
// Create the node
final JID creator = new JID(jidFrom);
final LeafNode newNode = new LeafNode(pepService, pepService.getRootCollectionNode(), nodeID, creator);
final DataForm publishOptions = PubSubEngine.getPublishOptions( packet );
if ( publishOptions != null )
{
try
{
newNode.configure( publishOptions );
}
catch ( NotAcceptableException e )
{
Log.warn( "Unable to apply publish-options when creating a new PEP node {} for {}", nodeID, creator, e );
}
}
newNode.addOwner(creator);
newNode.saveToDB();
}
......
......@@ -679,6 +679,8 @@ public class PubSubModule extends BasicModule implements ServerItemsProvider, Di
features.add("http://jabber.org/protocol/pubsub#subscribe");
// Configuration of subscription options is supported
features.add("http://jabber.org/protocol/pubsub#subscription-options");
// Publishing options are supported.
features.add("http://jabber.org/protocol/pubsub#publish-options");
}
else if (name == null) {
// Answer the features of a given node
......
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