From e560352fcf95ba70891d1a847973160c923fb702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 26 Aug 2018 17:39:16 +0200 Subject: Force connect to a server when a presence is received on a server JID --- src/xmpp/biboumi_component.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/xmpp') diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp index 4ed47cf..c6dc323 100644 --- a/src/xmpp/biboumi_component.cpp +++ b/src/xmpp/biboumi_component.cpp @@ -238,11 +238,22 @@ void BiboumiComponent::handle_presence(const Stanza& stanza) #endif } } + else if (type == "unavailable") + { + if (iid.type == Iid::Type::Server) + { + bridge->unforce_connect_to_server(iid.get_server(), from.resource); + } + } else if (type.empty()) { // We just receive a presence from someone (as the result of a probe, // or a directed presence, or a normal presence change) if (iid.type == Iid::Type::None) this->send_presence_to_contact(to_str, from.bare(), ""); + else if (iid.type == Iid::Type::Server) + { + bridge->force_connect_to_server(iid.get_server(), from.resource); + } } } else if (iid.type == Iid::Type::User) -- cgit v1.2.3