mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Use namespace definitions when possible
This commit is contained in:
parent
0c725b5fac
commit
b07cb1ed84
@ -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)).
|
||||
|
||||
|
@ -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, <<"">>),
|
||||
|
@ -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 = [],
|
||||
|
Loading…
Reference in New Issue
Block a user