mod_admin_extra: Fix private_get/private_set types

This commit is contained in:
Holger Weiss 2015-02-25 00:46:34 +01:00
parent e9f5cb2c14
commit d1fe26dd17
1 changed files with 3 additions and 3 deletions

View File

@ -460,12 +460,12 @@ commands() ->
#ejabberd_commands{name = private_get, tags = [private], #ejabberd_commands{name = private_get, tags = [private],
desc = "Get some information from a user private storage", desc = "Get some information from a user private storage",
module = ?MODULE, function = private_get, module = ?MODULE, function = private_get,
args = [{user, string}, {host, string}, {element, string}, {ns, string}], args = [{user, binary}, {host, binary}, {element, binary}, {ns, binary}],
result = {res, string}}, result = {res, string}},
#ejabberd_commands{name = private_set, tags = [private], #ejabberd_commands{name = private_set, tags = [private],
desc = "Set to the user private storage", desc = "Set to the user private storage",
module = ?MODULE, function = private_set, module = ?MODULE, function = private_set,
args = [{user, string}, {host, string}, {element, string}], args = [{user, binary}, {host, binary}, {element, binary}],
result = {res, rescode}}, result = {res, rescode}},
#ejabberd_commands{name = srg_create, tags = [shared_roster_group], #ejabberd_commands{name = srg_create, tags = [shared_roster_group],
@ -1289,7 +1289,7 @@ private_get(Username, Host, Element, Ns) ->
[{xmlel, <<"query">>, [{xmlel, <<"query">>,
[{<<"xmlns">>, <<"jabber:iq:private">>}], [{<<"xmlns">>, <<"jabber:iq:private">>}],
[SubEl]}] = ResIq#iq.sub_el, [SubEl]}] = ResIq#iq.sub_el,
xml:element_to_string(SubEl). binary_to_list(xml:element_to_binary(SubEl)).
private_set(Username, Host, ElementString) -> private_set(Username, Host, ElementString) ->
case xml_stream:parse_element(ElementString) of case xml_stream:parse_element(ElementString) of