diff options
author | fiaxh <git@lightrise.org> | 2020-07-03 21:14:39 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-07-16 23:31:19 +0200 |
commit | e159fd2492c28c1ef4ab64828ca0e8c2de877b41 (patch) | |
tree | aca3c42854b08b5683a1c85e7c7a74fd0a4bdf0d /plugins/omemo/src/jingle/jingle_helper.vala | |
parent | 74f7fa897f9aec298eeadcfc7a7b971f06498858 (diff) | |
download | dino-e159fd2492c28c1ef4ab64828ca0e8c2de877b41.tar.gz dino-e159fd2492c28c1ef4ab64828ca0e8c2de877b41.zip |
Only query entity caps when we need them
Diffstat (limited to 'plugins/omemo/src/jingle/jingle_helper.vala')
-rw-r--r-- | plugins/omemo/src/jingle/jingle_helper.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/omemo/src/jingle/jingle_helper.vala b/plugins/omemo/src/jingle/jingle_helper.vala index 6814fd00..4b6ed646 100644 --- a/plugins/omemo/src/jingle/jingle_helper.vala +++ b/plugins/omemo/src/jingle/jingle_helper.vala @@ -13,7 +13,7 @@ public class EncryptionHelper : JingleFileEncryptionHelper, Object { return true; } - public bool can_encrypt(Conversation conversation, FileTransfer file_transfer, Jid? full_jid) { + public async bool can_encrypt(Conversation conversation, FileTransfer file_transfer, Jid? full_jid) { XmppStream? stream = stream_interactor.get_stream(conversation.account); if (stream == null) return false; @@ -22,12 +22,12 @@ public class EncryptionHelper : JingleFileEncryptionHelper, Object { if (full_jid == null) { foreach (Jid test_jid in resources) { - if (stream.get_module(Module.IDENTITY).is_available(stream, test_jid)) { + if (yield stream.get_module(Module.IDENTITY).is_available(stream, test_jid)) { return true; } } } else { - if (stream.get_module(Module.IDENTITY).is_available(stream, full_jid)) { + if (yield stream.get_module(Module.IDENTITY).is_available(stream, full_jid)) { return true; } } |