Commit c530fb91 authored by louiz’'s avatar louiz’

Do not send an item-not-found presence from an invalid JID

parent 4a9beff7
......@@ -640,7 +640,10 @@ void XmppComponent::send_invalid_room_error(const std::string& muc_name,
const std::string& to)
{
Stanza presence("presence");
presence["from"] = muc_name + "@" + this->served_hostname + "/" + nick;
if (!muc_name.empty())
presence["from"] = muc_name + "@" + this->served_hostname + "/" + nick;
else
presence["from"] = this->served_hostname;
presence["to"] = to;
presence["type"] = "error";
XmlNode x("x");
......
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