summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_component.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-06-19 22:21:49 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-06-19 22:21:49 +0200
commit26ffc8fe121e03e1b663aa0015a71b0fc914f95e (patch)
tree098ca791e05911ecdc7ae22620c263669e37f7d3 /src/xmpp/xmpp_component.cpp
parenta705b9af7b1bbce6b6c94788398a4cff9cad9ec9 (diff)
downloadbiboumi-26ffc8fe121e03e1b663aa0015a71b0fc914f95e.tar.gz
biboumi-26ffc8fe121e03e1b663aa0015a71b0fc914f95e.tar.bz2
biboumi-26ffc8fe121e03e1b663aa0015a71b0fc914f95e.tar.xz
biboumi-26ffc8fe121e03e1b663aa0015a71b0fc914f95e.zip
Implement a way to add callbacks, waiting for an IRC event to return an iq
Diffstat (limited to 'src/xmpp/xmpp_component.cpp')
-rw-r--r--src/xmpp/xmpp_component.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index da9cded..901e168 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -220,14 +220,20 @@ void XmppComponent::send_stream_error(const std::string& name, const std::string
}
void XmppComponent::send_stanza_error(const std::string& kind, const std::string& to, const std::string& from,
- const std::string& id, const std::string& error_type,
- const std::string& defined_condition, const std::string& text)
+ const std::string& id, const std::string& error_type,
+ const std::string& defined_condition, const std::string& text,
+ const bool fulljid)
{
Stanza node(kind);
if (!to.empty())
node["to"] = to;
if (!from.empty())
- node["from"] = from;
+ {
+ if (fulljid)
+ node["from"] = from;
+ else
+ node["from"] = from + "@" + this->served_hostname;
+ }
if (!id.empty())
node["id"] = id;
node["type"] = "error";