mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix disco#items on pubsub nodes
SVN Revision: 2534
This commit is contained in:
parent
938a4007b3
commit
b4f0bb65c6
@ -1029,7 +1029,7 @@ node_disco_info(Host, Node, From, Identity, Features) ->
|
|||||||
[];
|
[];
|
||||||
true ->
|
true ->
|
||||||
Types =
|
Types =
|
||||||
case tree_call(Host, get_subnodes, [NodeId, From]) of
|
case tree_call(Host, get_subnodes, [Host, Node, From]) of
|
||||||
[] ->
|
[] ->
|
||||||
["leaf"]; %% No sub-nodes: it's a leaf node
|
["leaf"]; %% No sub-nodes: it's a leaf node
|
||||||
_ ->
|
_ ->
|
||||||
@ -1117,7 +1117,7 @@ iq_disco_items(Host, Item, From) ->
|
|||||||
RN = lists:last(SubNode),
|
RN = lists:last(SubNode),
|
||||||
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs = [?XMLATTR('jid', Host), ?XMLATTR('node', SN),
|
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs = [?XMLATTR('jid', Host), ?XMLATTR('node', SN),
|
||||||
?XMLATTR('name', RN)]}
|
?XMLATTR('name', RN)]}
|
||||||
end, tree_call(Host, get_subnodes, [NodeId, From])),
|
end, tree_call(Host, get_subnodes, [Host, Node, From])),
|
||||||
Items = lists:map(
|
Items = lists:map(
|
||||||
fun(#pubsub_item{itemid = {RN, _}}) ->
|
fun(#pubsub_item{itemid = {RN, _}}) ->
|
||||||
SN = node_to_string(Node) ++ "!" ++ RN,
|
SN = node_to_string(Node) ++ "!" ++ RN,
|
||||||
|
Loading…
Reference in New Issue
Block a user