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

This commit is contained in:
Florent Le Coz
2014-05-31 17:24:18 +02:00
parent 4a9beff74d
commit c530fb9156
+4 -1
View File
@@ -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");