summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-08-16 15:59:00 +0200
committerlouiz’ <louiz@louiz.org>2016-08-16 15:59:00 +0200
commit663d4ad54a014b2ced62610098a6f5676f813d10 (patch)
tree010f335639c1e0848ca6967eb4cbcb025c8a2e38 /src/xmpp
parent6bbab9d943a56e3cd20a2ac96cce1e9056d148cb (diff)
downloadbiboumi-663d4ad54a014b2ced62610098a6f5676f813d10.tar.gz
biboumi-663d4ad54a014b2ced62610098a6f5676f813d10.tar.bz2
biboumi-663d4ad54a014b2ced62610098a6f5676f813d10.tar.xz
biboumi-663d4ad54a014b2ced62610098a6f5676f813d10.zip
Forward mediated invitations (XMPP to IRC only)
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/biboumi_component.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp
index a0222f5..e7549df 100644
--- a/src/xmpp/biboumi_component.cpp
+++ b/src/xmpp/biboumi_component.cpp
@@ -254,6 +254,19 @@ void BiboumiComponent::handle_message(const Stanza& stanza)
}
}
}
+ else if (type == "normal" && iid.type == Iid::Type::Channel)
+ {
+ if (const XmlNode* x = stanza.get_child("x", MUC_USER_NS))
+ if (const XmlNode* invite = x->get_child("invite", MUC_USER_NS))
+ {
+ const auto invite_to = invite->get_tag("to");
+ if (!invite_to.empty())
+ {
+ bridge->send_irc_invitation(iid, invite_to);
+ }
+ }
+
+ }
else if (iid.type == Iid::Type::User)
this->send_invalid_user_error(to.local, from);
} catch (const IRCNotConnected& ex)