aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2014-05-21 00:07:57 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2014-05-21 00:07:57 +0200
commit6b996061a2bbdc6ee8aa1d64169638045e197596 (patch)
tree3670ebed70e82f551fedbe15eecc3ad82fbfe223 /src
parentIf log uses file:write, no need to double escape ~ in messages (EJAB-1696) (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd_c2s.erl4
1 files changed, 1 insertions, 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)),