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
+4 -1
View File
@@ -80,7 +80,10 @@ 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");
XmlSubNode next(actions, "next"); if (session.remaining_steps() == 1)
XmlSubNode next(actions, "complete");
else
XmlSubNode next(actions, "next");
} }
} }
else if (session_it != this->sessions.end() && action == "cancel") else if (session_it != this->sessions.end() && action == "cancel")