aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0410_muc_self_ping.vala
diff options
context:
space:
mode:
authorfrosty <frostinator33@airmail.cc>2026-10-26 10:21:57 -0400
committerfrosty <frostinator33@airmail.cc>2026-10-26 10:21:57 -0400
commit74aecd8b0986d07b50b7ce310d64e645b8b54e38 (patch)
tree560e6434f183eb54cd779936f3a4c9575146a066 /xmpp-vala/src/module/xep/0410_muc_self_ping.vala
parent3d7e90d401da02d430a87db0ec7e1db3a6f1a68f (diff)
parent4436001bb361ad4f9e4e05819214ecf0ea77c063 (diff)
Merge 'upstream/master'
Diffstat (limited to 'xmpp-vala/src/module/xep/0410_muc_self_ping.vala')
-rw-r--r--xmpp-vala/src/module/xep/0410_muc_self_ping.vala18
1 files changed, 11 insertions, 7 deletions
diff --git a/xmpp-vala/src/module/xep/0410_muc_self_ping.vala b/xmpp-vala/src/module/xep/0410_muc_self_ping.vala
index 84772333..6511789e 100644
--- a/xmpp-vala/src/module/xep/0410_muc_self_ping.vala
+++ b/xmpp-vala/src/module/xep/0410_muc_self_ping.vala
@@ -1,16 +1,20 @@
namespace Xmpp.Xep.MucSelfPing {
public static async bool is_joined(XmppStream stream, Jid jid) {
- Iq.Stanza iq_result = yield stream.get_module(Xmpp.Xep.Ping.Module.IDENTITY).send_ping(stream, jid);
+ try {
+ Iq.Stanza iq_result = yield stream.get_module(Xmpp.Xep.Ping.Module.IDENTITY).send_ping(stream, jid);
- if (!iq_result.is_error()) {
- return true;
- } else {
- var error_stanza = iq_result.get_error();
- if (error_stanza.condition in new string[] {ErrorStanza.CONDITION_SERVICE_UNAVAILABLE, ErrorStanza.CONDITION_FEATURE_NOT_IMPLEMENTED}) {
- // the client is joined, but the pinged client does not implement XMPP Ping
+ if (!iq_result.is_error()) {
return true;
+ } else {
+ var error_stanza = iq_result.get_error();
+ if (error_stanza.condition in new string[] {ErrorStanza.CONDITION_SERVICE_UNAVAILABLE, ErrorStanza.CONDITION_FEATURE_NOT_IMPLEMENTED}) {
+ // the client is joined, but the pinged client does not implement XMPP Ping
+ return true;
+ }
}
+ } catch (IOError e) {
+ // Ignoring, same as if ping failed
}
return false;
}