diff options
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); |