From 3848aabf242d15dec267d6f783dd01476963b1c3 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Thu, 2 Jan 2025 01:41:12 -0800 Subject: potential low-hanging fruit --- inbox_settings.php | 1 + keys.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inbox_settings.php b/inbox_settings.php index eb096d8..aa8e8a2 100644 --- a/inbox_settings.php +++ b/inbox_settings.php @@ -162,6 +162,7 @@ class inbox_settings extends rcube_plugin { $attrib['id'] = 'rcpgpkeyslist'; // info the js needs access to + $this->rcmail->output->set_env('userIDs', $this->rcmail->user->list_emails()); $this->rcmail->output->add_gui_object('keyslist', $attrib['id']); $this->rcmail->output->add_label( 'inbox_settings.generating_key', diff --git a/keys.js b/keys.js index 1b64df2..1fd3646 100644 --- a/keys.js +++ b/keys.js @@ -24,7 +24,7 @@ rcube_webmail.prototype.inbox_keys_select = function(list) { }; rcube_webmail.prototype.inbox_keys_generate = function() { - var userIDs = [], passphrase; + // TODO: passphrase prompt var comment = 'Generated ' + (new Date()).toLocaleDateString(); var generating_message = this.display_message( this.get_label('inbox_settings.generating_key'), 'loading'); @@ -32,7 +32,8 @@ rcube_webmail.prototype.inbox_keys_generate = function() { { type: 'ecc', curve: 'curve25519', - userIDs, + userIDs: this.env.userIDs.map( + identity => ({name: identity.name, email: identity.email})), passphrase, format: 'armored' }).then(generated => { -- cgit v1.2.3