diff options
Diffstat (limited to 'plugins/openpgp/src/stream_module.vala')
-rw-r--r-- | plugins/openpgp/src/stream_module.vala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/openpgp/src/stream_module.vala b/plugins/openpgp/src/stream_module.vala index 745f2005..6c55cdc5 100644 --- a/plugins/openpgp/src/stream_module.vala +++ b/plugins/openpgp/src/stream_module.vala @@ -33,8 +33,11 @@ namespace Dino.Plugins.OpenPgp { } } - public bool encrypt(Message.Stanza message, string key_id) { - string? enc_body = gpg_encrypt(message.body, new string[] {key_id, own_key.fpr}); + public bool encrypt(Message.Stanza message, Gee.List<string> fprs) { + string[] encrypt_to = new string[fprs.size + 1]; + for (int i = 0; i < fprs.size; i++) encrypt_to[i] = fprs[i]; + encrypt_to[encrypt_to.length - 1] = own_key.fpr; + string? enc_body = gpg_encrypt(message.body, encrypt_to); if (enc_body != null) { message.stanza.put_node(new StanzaNode.build("x", NS_URI_ENCRYPTED).add_self_xmlns().put_node(new StanzaNode.text(enc_body))); message.body = "[This message is OpenPGP encrypted (see XEP-0027)]"; |