From 80789c2e927e90b025f26951ed1bbbde25d5eb0f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 12 Nov 2014 08:11:21 +0100 Subject: send_iq_result can have a "from" with just the domain name --- src/xmpp/xmpp_component.cpp | 5 ++++- 1 file changed, 4 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 794b45b..516b932 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -1128,7 +1128,10 @@ void XmppComponent::send_ping_request(const std::string& from, void XmppComponent::send_iq_result(const std::string& id, const std::string& to_jid, const std::string& from_local_part) { Stanza iq("iq"); - iq["from"] = from_local_part + "@" + this->served_hostname; + if (!from_local_part.empty()) + iq["from"] = from_local_part + "@" + this->served_hostname; + else + iq["from"] = this->served_hostname; iq["to"] = to_jid; iq["id"] = id; iq["type"] = "result"; -- cgit v1.2.3