diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-09-18 21:52:11 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-09-18 22:09:26 +0200 |
commit | 19666d2ffd3ce36b7edd4044143fe535ef85dbd9 (patch) | |
tree | 3dacaabd486bd2a3ded51c65c560e978615b690d /louloulibs/xmpp/adhoc_commands_handler.cpp | |
parent | 88ae2599f6dbf655e8806c9b4619ec089425683b (diff) | |
download | biboumi-19666d2ffd3ce36b7edd4044143fe535ef85dbd9.tar.gz biboumi-19666d2ffd3ce36b7edd4044143fe535ef85dbd9.tar.bz2 biboumi-19666d2ffd3ce36b7edd4044143fe535ef85dbd9.tar.xz biboumi-19666d2ffd3ce36b7edd4044143fe535ef85dbd9.zip |
Store the target jid in the AdhocSession objects
Diffstat (limited to 'louloulibs/xmpp/adhoc_commands_handler.cpp')
-rw-r--r-- | louloulibs/xmpp/adhoc_commands_handler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/louloulibs/xmpp/adhoc_commands_handler.cpp b/louloulibs/xmpp/adhoc_commands_handler.cpp index 458a22c..714c440 100644 --- a/louloulibs/xmpp/adhoc_commands_handler.cpp +++ b/louloulibs/xmpp/adhoc_commands_handler.cpp @@ -20,7 +20,7 @@ std::map<const std::string, const AdhocCommand>& AdhocCommandsHandler::get_comma return this->commands; } -XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, XmlNode command_node) +XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, const std::string& to, XmlNode command_node) { std::string action = command_node.get_tag("action"); if (action.empty()) @@ -57,7 +57,7 @@ XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, Xm command_node["sessionid"] = sessionid; this->sessions.emplace(std::piecewise_construct, std::forward_as_tuple(sessionid, executor_jid), - std::forward_as_tuple(command_it->second, executor_jid)); + std::forward_as_tuple(command_it->second, executor_jid, to)); TimedEventsManager::instance().add_event(TimedEvent(std::chrono::steady_clock::now() + 3600s, std::bind(&AdhocCommandsHandler::remove_session, this, sessionid, executor_jid), "adhocsession"s + sessionid + executor_jid)); |