Commit 39a32d55 authored by Link Mauve's avatar Link Mauve Committed by louiz’

Use jid.bare() instead of manual concatenation

parent 5ef7ba08
...@@ -103,7 +103,7 @@ const std::string& Bridge::get_jid() const ...@@ -103,7 +103,7 @@ const std::string& Bridge::get_jid() const
std::string Bridge::get_bare_jid() const std::string Bridge::get_bare_jid() const
{ {
Jid jid(this->user_jid); 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) Xmpp::body Bridge::make_xmpp_body(const std::string& str, const std::string& encoding)
......
...@@ -41,7 +41,7 @@ XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, co ...@@ -41,7 +41,7 @@ XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, co
XmlSubNode condition(error, STANZA_NS":item-not-found"); XmlSubNode condition(error, STANZA_NS":item-not-found");
} }
else if (command_it->second.is_admin_only() && 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"); XmlSubNode error(command_node, ADHOC_NS":error");
error["type"] = "cancel"; error["type"] = "cancel";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment