summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-08-26 17:39:16 +0200
committerlouiz’ <louiz@louiz.org>2018-09-29 20:04:42 +0200
commite560352fcf95ba70891d1a847973160c923fb702 (patch)
tree714c34103ba77be51e03ba912e8b503a5ce2205f /src/xmpp
parentbf97478b89b24bbf3a6a92c9137041cf2e987f02 (diff)
downloadbiboumi-e560352fcf95ba70891d1a847973160c923fb702.tar.gz
biboumi-e560352fcf95ba70891d1a847973160c923fb702.tar.bz2
biboumi-e560352fcf95ba70891d1a847973160c923fb702.tar.xz
biboumi-e560352fcf95ba70891d1a847973160c923fb702.zip
Force connect to a server when a presence is received on a server JID
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/biboumi_component.cpp11
1 files changed, 11 insertions, 0 deletions
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)