mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
parent
aba7150af1
commit
76ebebf2a0
12
src/jlib.erl
12
src/jlib.erl
@ -451,23 +451,15 @@ iq_type_to_string(error) -> <<"error">>.
|
|||||||
).
|
).
|
||||||
|
|
||||||
iq_to_xml(#iq{id = ID, type = Type, sub_el = SubEl}) ->
|
iq_to_xml(#iq{id = ID, type = Type, sub_el = SubEl}) ->
|
||||||
Children = case Type of
|
|
||||||
set ->
|
|
||||||
[SubEl];
|
|
||||||
get ->
|
|
||||||
[SubEl];
|
|
||||||
_ ->
|
|
||||||
SubEl
|
|
||||||
end,
|
|
||||||
if ID /= <<"">> ->
|
if ID /= <<"">> ->
|
||||||
#xmlel{name = <<"iq">>,
|
#xmlel{name = <<"iq">>,
|
||||||
attrs =
|
attrs =
|
||||||
[{<<"id">>, ID}, {<<"type">>, iq_type_to_string(Type)}],
|
[{<<"id">>, ID}, {<<"type">>, iq_type_to_string(Type)}],
|
||||||
children = Children};
|
children = SubEl};
|
||||||
true ->
|
true ->
|
||||||
#xmlel{name = <<"iq">>,
|
#xmlel{name = <<"iq">>,
|
||||||
attrs = [{<<"type">>, iq_type_to_string(Type)}],
|
attrs = [{<<"type">>, iq_type_to_string(Type)}],
|
||||||
children = Children}
|
children = SubEl}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
-spec(parse_xdata_submit/1 ::
|
-spec(parse_xdata_submit/1 ::
|
||||||
|
Loading…
Reference in New Issue
Block a user