From e159fd2492c28c1ef4ab64828ca0e8c2de877b41 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 3 Jul 2020 21:14:39 +0200 Subject: Only query entity caps when we need them --- xmpp-vala/src/module/xep/0391_jingle_encrypted_transports.vala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xmpp-vala/src/module/xep/0391_jingle_encrypted_transports.vala') diff --git a/xmpp-vala/src/module/xep/0391_jingle_encrypted_transports.vala b/xmpp-vala/src/module/xep/0391_jingle_encrypted_transports.vala index 1161ec96..ff25d9b3 100644 --- a/xmpp-vala/src/module/xep/0391_jingle_encrypted_transports.vala +++ b/xmpp-vala/src/module/xep/0391_jingle_encrypted_transports.vala @@ -18,9 +18,8 @@ public class Module : XmppStreamModule, SecurityPrecondition { stream.get_module(ServiceDiscovery.Module.IDENTITY).remove_feature(stream, NS_URI); } - public bool is_available(XmppStream stream, Jid full_jid) { - bool? has_feature = stream.get_flag(ServiceDiscovery.Flag.IDENTITY).has_entity_feature(full_jid, NS_URI); - return has_feature != null && (!)has_feature; + public async bool is_available(XmppStream stream, Jid full_jid) { + return yield stream.get_module(ServiceDiscovery.Module.IDENTITY).has_entity_feature(stream, full_jid, NS_URI); } public void register_envelop_encoding(EnvelopEncoding encoding) { -- cgit v1.2.3-54-g00ecf