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

Omit XML namespace declaration for <iq/> stanzas

Only the child elements of <iq/> stanzas are qualified by the namespaces
in question, not the <iq/> stanzas themselves.

This change just clarifies the code.  It doesn't alter the behaviour, as
those <iq/> stanzas are handed over to jlib:iq_to_xml/1, and that
function ignores the 'xmlns' attribute anyway.
This commit is contained in:
Holger Weiss 2014-05-21 00:07:57 +02:00
parent 5010cea1a4
commit 6b996061a2

View File

@ -1395,7 +1395,6 @@ handle_info({route, _From, _To, {broadcast, Data}},
fsm_next_state(StateName, StateData);
NewPL ->
PrivPushIQ = #iq{type = set,
xmlns = ?NS_PRIVACY,
id = <<"push",
(randoms:get_string())/binary>>,
sub_el =
@ -2557,8 +2556,7 @@ route_blocking(What, StateData) ->
#xmlel{name = <<"unblock">>,
attrs = [{<<"xmlns">>, ?NS_BLOCKING}], children = []}
end,
PrivPushIQ = #iq{type = set, xmlns = ?NS_BLOCKING,
id = <<"push">>, sub_el = [SubEl]},
PrivPushIQ = #iq{type = set, id = <<"push">>, sub_el = [SubEl]},
PrivPushEl =
jlib:replace_from_to(jlib:jid_remove_resource(StateData#state.jid),
StateData#state.jid, jlib:iq_to_xml(PrivPushIQ)),