XEP-0050 says: "The result for each stage (other than the last) of a
command's execution SHOULD include an <actions/> element." Some clients
insist on this.
ProvidedSessionID /= <<"">> -> ProvidedSessionID;
true -> jlib:now_to_utc_string(p1_time_compat:timestamp())
end,
- case Actions of
- [] ->
+ case {Actions, Status} of
+ {[], completed} ->
ActionsEls = [];
+ {[], _} ->
+ ActionsEls = [
+ #xmlel{
+ name = <<"actions">>,
+ attrs = [{<<"execute">>, <<"complete">>}],
+ children = [#xmlel{name = <<"complete">>}]
+ }
+ ];
_ ->
case DefaultAction of
<<"">> -> ActionsElAttrs = [];