diff --git a/src/adhoc.erl b/src/adhoc.erl index 6970584f9..23ffd8dd8 100644 --- a/src/adhoc.erl +++ b/src/adhoc.erl @@ -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 = [];