aboutsummaryrefslogtreecommitdiff
path: root/plugins/openpgp/src/encryption_list_entry.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/openpgp/src/encryption_list_entry.vala')
-rw-r--r--plugins/openpgp/src/encryption_list_entry.vala5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/openpgp/src/encryption_list_entry.vala b/plugins/openpgp/src/encryption_list_entry.vala
index 9aac3db2..584e065b 100644
--- a/plugins/openpgp/src/encryption_list_entry.vala
+++ b/plugins/openpgp/src/encryption_list_entry.vala
@@ -19,8 +19,9 @@ private class EncryptionListEntry : Plugins.EncryptionListEntry, Object {
}}
public bool can_encrypt(Entities.Conversation conversation) {
- return stream_interactor.get_module(Manager.IDENTITY).get_key_id(conversation.account, conversation.counterpart) != null;
+ 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;
}
}
-} \ No newline at end of file
+}