diff options
author | fiaxh <git@mx.ax.lt> | 2017-10-29 15:15:28 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-10-31 15:41:45 +0100 |
commit | 0102abeec1d2055b19dccbb7edc7f06e527642b1 (patch) | |
tree | 4018e82224c19142c4a7a6eced67d9c2550b2dd8 /plugins/openpgp/src/encryption_list_entry.vala | |
parent | b9df78e4494879752e9e68dcc5d54e03fffe9467 (diff) | |
download | dino-0102abeec1d2055b19dccbb7edc7f06e527642b1.tar.gz dino-0102abeec1d2055b19dccbb7edc7f06e527642b1.zip |
Fix warnings
Diffstat (limited to 'plugins/openpgp/src/encryption_list_entry.vala')
-rw-r--r-- | plugins/openpgp/src/encryption_list_entry.vala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/openpgp/src/encryption_list_entry.vala b/plugins/openpgp/src/encryption_list_entry.vala index e0a11865..d2cbd13f 100644 --- a/plugins/openpgp/src/encryption_list_entry.vala +++ b/plugins/openpgp/src/encryption_list_entry.vala @@ -23,7 +23,9 @@ private class EncryptionListEntry : Plugins.EncryptionListEntry, Object { public bool can_encrypt(Entities.Conversation conversation) { if (conversation.type_ == Conversation.Type.CHAT) { string? key_id = stream_interactor.get_module(Manager.IDENTITY).get_key_id(conversation.account, conversation.counterpart); - return key_id != null && GPGHelper.get_keylist(key_id).size > 0; + try { + return key_id != null && GPGHelper.get_keylist(key_id).size > 0; + } catch (Error e) { return false; } } else if (conversation.type_ == Conversation.Type.GROUPCHAT) { Gee.List<Jid> muc_jids = new Gee.ArrayList<Jid>(); Gee.List<Jid>? occupants = stream_interactor.get_module(MucManager.IDENTITY).get_occupants(conversation.counterpart, conversation.account); |