From 6b996061a2bbdc6ee8aa1d64169638045e197596 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 21 May 2014 00:07:57 +0200 Subject: [PATCH] Omit XML namespace declaration for stanzas Only the child elements of stanzas are qualified by the namespaces in question, not the stanzas themselves. This change just clarifies the code. It doesn't alter the behaviour, as those stanzas are handed over to jlib:iq_to_xml/1, and that function ignores the 'xmlns' attribute anyway. --- src/ejabberd_c2s.erl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 85a696c7f..00ecaa008 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -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)),