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

Revert "Fix IQ XML generation."

This reverts commit 26a4d91297.
This commit is contained in:
Evgeniy Khramtsov 2014-07-05 17:53:45 +04:00
parent aba7150af1
commit 76ebebf2a0

View File

@ -451,23 +451,15 @@ iq_type_to_string(error) -> <<"error">>.
).
iq_to_xml(#iq{id = ID, type = Type, sub_el = SubEl}) ->
Children = case Type of
set ->
[SubEl];
get ->
[SubEl];
_ ->
SubEl
end,
if ID /= <<"">> ->
#xmlel{name = <<"iq">>,
attrs =
[{<<"id">>, ID}, {<<"type">>, iq_type_to_string(Type)}],
children = Children};
children = SubEl};
true ->
#xmlel{name = <<"iq">>,
attrs = [{<<"type">>, iq_type_to_string(Type)}],
children = Children}
children = SubEl}
end.
-spec(parse_xdata_submit/1 ::