diff options
author | louiz’ <louiz@louiz.org> | 2019-08-28 22:58:30 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2019-09-14 11:50:21 +0200 |
commit | c13f3005e6fd984d6f79ca98c682f7d2059495f7 (patch) | |
tree | feacdfcc709034a1758a986c53f388d2e7bc426b | |
parent | f1936fdd082f104f278b292a7f11231f53c2a16b (diff) | |
download | biboumi-c13f3005e6fd984d6f79ca98c682f7d2059495f7.tar.gz biboumi-c13f3005e6fd984d6f79ca98c682f7d2059495f7.tar.bz2 biboumi-c13f3005e6fd984d6f79ca98c682f7d2059495f7.tar.xz biboumi-c13f3005e6fd984d6f79ca98c682f7d2059495f7.zip |
Use a “complete” action for the last step of ad-hoc commands instead of next
-rw-r--r-- | src/xmpp/adhoc_commands_handler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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") |