[ejabberd] Running two pubsub modules in one VH

Eric Cestari eric at ohmforce.com
Tue Sep 9 20:11:18 MSD 2008


Le 9 sept. 08 à 17:27, Christophe Romain a écrit :

> This is really hard to do. the reason is that, when calling a  
> function as get_subnodes, you don't know by advance the nodetree  
> type for the given node.
>
> to make this working:
> 1) you can do that by handling several hosts, each host having its  
> own nodetree type.
> 2) you can define a node hierarchy convention allowing to quickly  
> know the nodetree type of all subnodes
>  example:
> 	/tree/host/user/....
> hopefully, all nodetree calls are in form Functions([Host,Node|_]).  
> so using that rule you only need to patch mod_pubsub:tree_call/3  
> like this
> ...
>  [_, [TreeType | _] | _] = Args,
>  Module = list_to_atom(?TREE_PREFIX ++TreeType)
>  catch apply(Module, Function, Args).

That's very interesting.

I think I will work this way.
By the way, I'd like to be sure about the different functions in a  
nodetree :

set_node <-- used for persisting node configuration after update

get_node(Host, Node) <-- used for accessing a node, adding an item or  
a node to it. Any more uses ?

get_nodes(Key) <-- get all the nodes from a virtual host. Uses ?

get_subnodes <-- used for disco, and nothing else, right ?

get_subnodes_tree <-- unused currently (?)

Am I missing something ?

and just a quick one here also :) :
https://support.process-one.net/browse/EJAB-737

Eric
>


More information about the ejabberd mailing list