We’ve been using a modified version of the 3.1 library for a while now. We had to make a few modifications to get it to work properly for us. In one case, there is an obvious pubsub bug that we had to fix. In others, the pubsub implementation had to be extended slightly to provide the information that we needed from certain events.
I’ve taken the liberty of creating a patch of these changes against the current smack trunk.
Here are the specific changes:
In smackx/pubsub/ConfigureForm, the setChildrenAssociationPolicy has a bug. It was setting a LIST value using a single string, when it should have been a list. I assume that no one else has ever used this method before because it will immediately throw an exception if you use it as it was. This fix, just places the requested policy into a list before setting the answer.
In smackx/pubsub/Item, the packet extension should include a node attribute. This has been added.
In smackx/pubsub/ItemDeleteEvent, there should be a list of affected nodes – in order to conform with collection node scenarios.
In smackx/pubsub/Node, the constructor calls to ItemDeleteEvent have to be updated accordingly when retracting a node.
In smackx/pubsub/PayloadItem, we added support for the node attribute.
In smackx/pubsub/RetractItem, we also added support for specifying the node.
With these changes, the smack library works properly with collection nodes.
Kingston Duffie
smackPubSub.patch.zip (2254 Bytes)