25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Use namespace definitions when possible

This commit is contained in:
Badlop 2015-05-21 17:03:06 +02:00
parent 0c725b5fac
commit b07cb1ed84
3 changed files with 7 additions and 7 deletions

View File

@ -1068,7 +1068,7 @@ subscribe(LU, LS, User, Server, Nick, Group, Subscription, _Xattrs) ->
mod_roster:set_items(
LU, LS,
{xmlel, <<"query">>,
[{<<"xmlns">>, <<"jabber:iq:roster">>}],
[{<<"xmlns">>, ?NS_ROSTER}],
[ItemEl]}).
delete_rosteritem(LocalUser, LocalServer, User, Server) ->
@ -1085,7 +1085,7 @@ unsubscribe(LU, LS, User, Server) ->
mod_roster:set_items(
LU, LS,
{xmlel, <<"query">>,
[{<<"xmlns">>, <<"jabber:iq:roster">>}],
[{<<"xmlns">>, ?NS_ROSTER}],
[ItemEl]}).
%% -----------------------------
@ -1250,7 +1250,7 @@ private_get(Username, Host, Element, Ns) ->
[{xmlel, Element, [{<<"xmlns">>, Ns}], []}]}},
ResIq = mod_private:process_sm_iq(From, To, IQ),
[{xmlel, <<"query">>,
[{<<"xmlns">>, <<"jabber:iq:private">>}],
[{<<"xmlns">>, ?NS_PRIVATE}],
[SubEl]}] = ResIq#iq.sub_el,
binary_to_list(xml:element_to_binary(SubEl)).

View File

@ -2022,14 +2022,14 @@ stop_node(From, Host, ENode, Action, XData) ->
#xmlel{name = <<"x">>,
attrs =
[{<<"xmlns">>,
<<"jabber:x:data">>},
?NS_XDATA},
{<<"type">>, <<"submit">>}],
children = SubEls},
others =
[#xmlel{name = <<"x">>,
attrs =
[{<<"xmlns">>,
<<"jabber:x:data">>},
?NS_XDATA},
{<<"type">>, <<"submit">>}],
children = SubEls}]},
To = jlib:make_jid(<<"">>, Host, <<"">>),

View File

@ -282,7 +282,7 @@ process_iq(From, To,
[#xmlel{name = <<"query">>,
attrs =
[{<<"xmlns">>,
<<"jabber:iq:register">>}],
?NS_REGISTER}],
children =
[TopInstrEl | CaptchaEls]}]};
{error, limit} ->
@ -304,7 +304,7 @@ process_iq(From, To,
[#xmlel{name = <<"query">>,
attrs =
[{<<"xmlns">>,
<<"jabber:iq:register">>}],
?NS_REGISTER}],
children =
[#xmlel{name = <<"instructions">>,
attrs = [],