25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Fix missing tag when configuring subscription option (thanks to Clochix)

SVN Revision: 2576
This commit is contained in:
Badlop 2009-09-01 08:18:30 +00:00
parent a033b06150
commit 55fef3c3e7

View File

@ -2464,7 +2464,17 @@ read_sub(Subscriber, NodeID, SubID, Lang) ->
{error, notfound} -> {error, notfound} ->
{error, ?ERR_EXTENDED(?ERR_NOT_ACCEPTABLE, "invalid-subid")}; {error, ?ERR_EXTENDED(?ERR_NOT_ACCEPTABLE, "invalid-subid")};
{result, #pubsub_subscription{options = Options}} -> {result, #pubsub_subscription{options = Options}} ->
pubsub_subscription:get_options_xform(Lang, Options) {result, XdataEl} = pubsub_subscription:get_options_xform(Lang, Options),
[N] = mnesia:dirty_match_object({pubsub_node,'_',NodeID,'_','_','_','_'}),
{_, Node} = N#pubsub_node.nodeid,
NodeIDStr = node_to_string(Node),
SubscriberStr = jlib:jid_to_string(Subscriber),
OptionsEl = {xmlelement, "options", [{"node", NodeIDStr},
{"jid", SubscriberStr},
{"subid", SubID}],
[XdataEl]},
PubsubEl = {xmlelement, "pubsub", [{"xmlns", ?NS_PUBSUB}], [OptionsEl]},
{result, PubsubEl}
end. end.
set_options(Host, Node, JID, SubID, Configuration) -> set_options(Host, Node, JID, SubID, Configuration) ->