]> granicus.if.org Git - ejabberd/commitdiff
Fix private_get command sending a proper xmlel (#1683)
authorBadlop <badlop@process-one.net>
Thu, 20 Apr 2017 14:50:08 +0000 (16:50 +0200)
committerBadlop <badlop@process-one.net>
Thu, 20 Apr 2017 14:50:08 +0000 (16:50 +0200)
src/mod_admin_extra.erl

index 4877a863f27b36fc5335a5ae55127cbaff22af86..141f5f5db568d1e58234e15f96efb3173e5efde7 100644 (file)
@@ -1363,8 +1363,9 @@ get_last(User, Server) ->
 %% <aa xmlns='bb'>Cluth</aa>
 
 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),
-                              [Ns, Element]),
+                              [{Ns, ElementXml}]),
     binary_to_list(fxml:element_to_binary(xmpp:encode(#private{xml_els = Els}))).
 
 private_set(Username, Host, ElementString) ->