summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-10-07 23:29:14 +0200
committerlouiz’ <louiz@louiz.org>2016-10-07 23:29:14 +0200
commit116472920ce4bcd4c9512db67108cdbf9895e8ad (patch)
treedc50377bfb945c35cc8c0de12285594f30b81740
parent8ac8d2b2425d19eb995a36efa808b664979e358f (diff)
downloadbiboumi-116472920ce4bcd4c9512db67108cdbf9895e8ad.tar.gz
biboumi-116472920ce4bcd4c9512db67108cdbf9895e8ad.tar.bz2
biboumi-116472920ce4bcd4c9512db67108cdbf9895e8ad.tar.xz
biboumi-116472920ce4bcd4c9512db67108cdbf9895e8ad.zip
Fix the muc#traffic response
Was completely broken, and the test was just useless
-rw-r--r--src/xmpp/biboumi_component.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp
index 49a1fd5..86bef2d 100644
--- a/src/xmpp/biboumi_component.cpp
+++ b/src/xmpp/biboumi_component.cpp
@@ -389,7 +389,7 @@ void BiboumiComponent::handle_iq(const Stanza& stanza)
const XmlNode* query;
if ((query = stanza.get_child("query", DISCO_INFO_NS)))
{ // Disco info
- Iid iid(to.local, {});
+ Iid iid(to.local, {'#', '&'});
const std::string node = query->get_tag("node");
if (to_str == this->served_hostname)
{
@@ -413,6 +413,7 @@ void BiboumiComponent::handle_iq(const Stanza& stanza)
if (node == MUC_TRAFFIC_NS)
{
this->send_irc_channel_muc_traffic_info(id, from, to_str);
+ stanza_error.disable();
}
}
}
@@ -744,7 +745,7 @@ void BiboumiComponent::send_irc_channel_muc_traffic_info(const std::string id, c
query["node"] = MUC_TRAFFIC_NS;
// We drop all “special” traffic (like xhtml-im, chatstates, etc), so
// don’t include any <feature/>
- iq.add_child(std::move(iq));
+ iq.add_child(std::move(query));
this->send_stanza(iq);