summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-11-12 08:11:21 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-11-12 08:13:09 +0100
commit80789c2e927e90b025f26951ed1bbbde25d5eb0f (patch)
tree2c49921213b7092ffe8e0ecba90ee734cd76ef71 /src
parent4a8bcd3cbde0a41902999db7acc346de020cf564 (diff)
downloadbiboumi-80789c2e927e90b025f26951ed1bbbde25d5eb0f.tar.gz
biboumi-80789c2e927e90b025f26951ed1bbbde25d5eb0f.tar.bz2
biboumi-80789c2e927e90b025f26951ed1bbbde25d5eb0f.tar.xz
biboumi-80789c2e927e90b025f26951ed1bbbde25d5eb0f.zip
send_iq_result can have a "from" with just the domain name
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/xmpp_component.cpp5
1 files changed, 4 insertions, 1 deletions
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";