In fixed mode, server messages come from biboumi’s hostname directly
Instead of irc.example.com@biboumi, because that’s actually user named “irc.example.com”, in that case. And that fixes the raw messages in fixed mode. fix #3286
This commit is contained in:
@@ -277,7 +277,12 @@ void XmppComponent::send_message(const std::string& from, Xmpp::body&& body, con
|
||||
if (fulljid)
|
||||
message["from"] = from;
|
||||
else
|
||||
message["from"] = from + "@" + this->served_hostname;
|
||||
{
|
||||
if (!from.empty())
|
||||
message["from"] = from + "@" + this->served_hostname;
|
||||
else
|
||||
message["from"] = this->served_hostname;
|
||||
}
|
||||
if (!type.empty())
|
||||
message["type"] = type;
|
||||
XmlSubNode body_node(message, "body");
|
||||
|
||||
Reference in New Issue
Block a user