From 25243f53c2479e2fda0f1a05d1589c8214b70b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 27 Aug 2017 14:32:29 +0200 Subject: =?UTF-8?q?In=20fixed=20mode,=20server=20messages=20come=20from=20?= =?UTF-8?q?biboumi=E2=80=99s=20hostname=20directly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/xmpp/xmpp_component.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/xmpp/xmpp_component.cpp') diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 42a5392..24a85d7 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -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"); -- cgit v1.2.3