Use a “complete” action for the last step of ad-hoc commands instead of next

This commit is contained in:
louiz’
2019-09-14 11:50:21 +02:00
parent f1936fdd08
commit c13f3005e6
+3
View File
@@ -80,6 +80,9 @@ XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, co
{ {
command_node["status"] = "executing"; command_node["status"] = "executing";
XmlSubNode actions(command_node, "actions"); XmlSubNode actions(command_node, "actions");
if (session.remaining_steps() == 1)
XmlSubNode next(actions, "complete");
else
XmlSubNode next(actions, "next"); XmlSubNode next(actions, "next");
} }
} }