Use jid.bare() instead of manual concatenation

This commit is contained in:
Emmanuel Gil Peyrot
2018-04-16 00:53:25 +02:00
committed by louiz’
parent 5ef7ba0802
commit 39a32d5524
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ const std::string& Bridge::get_jid() const
std::string Bridge::get_bare_jid() const
{
Jid jid(this->user_jid);
return jid.local + "@" + jid.domain;
return jid.bare();
}
Xmpp::body Bridge::make_xmpp_body(const std::string& str, const std::string& encoding)
+1 -1
View File
@@ -41,7 +41,7 @@ XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, co
XmlSubNode condition(error, STANZA_NS":item-not-found");
}
else if (command_it->second.is_admin_only() &&
Config::get("admin", "") != jid.local + "@" + jid.domain)
Config::get("admin", "") != jid.bare())
{
XmlSubNode error(command_node, ADHOC_NS":error");
error["type"] = "cancel";