Commit log for included patch:
Add a good chunk of support for XEP-0248: PubSub Collection Nodes.
- No schema changes. The only change you might need to care about is
the one for node_default marked 'API-CHANGE'.
- Notifications can be delivered via collection nodes. These
notifications are distinguished between item and node types.
- [API-CHANGE] To accomodate XEP-0060 better, I've allowed owners to
have subscription 'none'. This required a change in node_default
when creating the node. If you create your own nodes without using
node_default's function, you should probably do this, too.
- Since subscription options aren't available, assume default
options of depth 'all' and type 'nodes' for collection nodes and
'items' for leaf nodes. This does violate the XEP, but is still
pretty useful for most people and without changing schema I'm not
sure what else to do.
- Add support for "pubsub#collection" text-multis in node
- Support for notifications of: item publish, item retract, node
configuration, node purge, node creation, node deletion.
- Fix a bug when notifying about node deletion, where even owners
wouldn't get a notification.
- Normalized a lot of the broadcast code to reduce my typing strain.
- added mod_pubsub:make_stanza/4 to support SHIM headers.
- added namespace constants to jlib.hrl for SHIM headers.
- Subscription options are basically required, but they will require
a schema change or adding a table.
- Configuration forms do not distinguish between collection and leaf
nodes, in violation of the XEP.
- Subscription depth defaults to all because I can't pass it up from
get_states/2 in the nodetree module. This also violates the XEP.
- Localization of configuration form for 'pubsub#collection'
As alluded to above, this is an almost-completely-backwards-compatible patch. Everything should continue to work using the new support, but new behavior won't be added. The behavior is contingent on a nodetree module which does the right thing, and a change to a node. The node change is straight -forward, so here it is:
That relies on the nodetree_dag, which I'm including in this mail.