24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00

Fix private_get command sending a proper xmlel (#1683)

This commit is contained in:
Badlop 2017-04-20 16:50:08 +02:00
parent 4e86a71ab2
commit ca9d04ba6b

View File

@ -1363,8 +1363,9 @@ get_last(User, Server) ->
%% <aa xmlns='bb'>Cluth</aa> %% <aa xmlns='bb'>Cluth</aa>
private_get(Username, Host, Element, Ns) -> private_get(Username, Host, Element, Ns) ->
ElementXml = [{Ns, #xmlel{name = Element, attrs = [{<<"xmlns">>, Ns}]}}],
Els = mod_private:get_data(jid:nodeprep(Username), jid:nameprep(Host), Els = mod_private:get_data(jid:nodeprep(Username), jid:nameprep(Host),
[Ns, Element]), [{Ns, ElementXml}]),
binary_to_list(fxml:element_to_binary(xmpp:encode(#private{xml_els = Els}))). binary_to_list(fxml:element_to_binary(xmpp:encode(#private{xml_els = Els}))).
private_set(Username, Host, ElementString) -> private_set(Username, Host, ElementString) ->