From c13f3005e6fd984d6f79ca98c682f7d2059495f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 28 Aug 2019 22:58:30 +0200 Subject: =?UTF-8?q?Use=20a=20=E2=80=9Ccomplete=E2=80=9D=20action=20for=20t?= =?UTF-8?q?he=20last=20step=20of=20ad-hoc=20commands=20instead=20of=20next?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/xmpp/adhoc_commands_handler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/xmpp') diff --git a/src/xmpp/adhoc_commands_handler.cpp b/src/xmpp/adhoc_commands_handler.cpp index bc4c108..ff4c1e5 100644 --- a/src/xmpp/adhoc_commands_handler.cpp +++ b/src/xmpp/adhoc_commands_handler.cpp @@ -80,7 +80,10 @@ XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, co { command_node["status"] = "executing"; 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") -- cgit v1.2.3