mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Always include <actions/> with ad-hoc responses
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.
This commit is contained in:
parent
b693601dd1
commit
d97e777c9b
@ -112,9 +112,17 @@ produce_response(
|
||||
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 = [];
|
||||
|
Loading…
Reference in New Issue
Block a user