From 663d4ad54a014b2ced62610098a6f5676f813d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 16 Aug 2016 15:59:00 +0200 Subject: Forward mediated invitations (XMPP to IRC only) --- src/xmpp/biboumi_component.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/xmpp/biboumi_component.cpp') 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) -- cgit v1.2.3