mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
parent
aba7150af1
commit
76ebebf2a0
14
src/jlib.erl
14
src/jlib.erl
@ -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 ::
|
||||
@ -808,7 +800,7 @@ base64_to_term(Base64) ->
|
||||
decode_base64(S) ->
|
||||
decode_base64_bin(S, <<>>).
|
||||
|
||||
take_without_spaces(Bin, Count) ->
|
||||
take_without_spaces(Bin, Count) ->
|
||||
take_without_spaces(Bin, Count, <<>>).
|
||||
|
||||
take_without_spaces(Bin, 0, Acc) ->
|
||||
|
Loading…
Reference in New Issue
Block a user