diff options
Diffstat (limited to 'alot/commands')
-rw-r--r-- | alot/commands/envelope.py | 6 | ||||
-rw-r--r-- | alot/commands/globals.py | 6 | ||||
-rw-r--r-- | alot/commands/utils.py | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index 535ce06c..4b02e67e 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -428,7 +428,7 @@ class SetCommand(Command): # as the key of the person BCC'd will be available to other recievers, # defeating the purpose of BCCing them if self.key.lower() in ['to', 'from', 'cc']: - yield utils.set_encrypt(ui, ui.current_buffer.envelope) + yield utils.update_keys(ui, ui.current_buffer.envelope) ui.current_buffer.rebuild() @@ -452,7 +452,7 @@ class UnsetCommand(Command): # as the key of the person BCC'd will be available to other recievers, # defeating the purpose of BCCing them if self.key.lower() in ['to', 'from', 'cc']: - yield utils.set_encrypt(ui, ui.current_buffer.envelope) + yield utils.update_keys(ui, ui.current_buffer.envelope) ui.current_buffer.rebuild() @@ -603,7 +603,7 @@ class EncryptCommand(Command): tmp_key = crypto.get_key(keyid) envelope.encrypt_keys[tmp_key.fpr] = tmp_key else: - yield utils.set_encrypt(ui, envelope, signed_only=self.trusted) + yield utils.update_keys(ui, envelope, signed_only=self.trusted) envelope.encrypt = encrypt if not envelope.encrypt: # This is an extra conditional as it can even happen if encrypt is diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 906117a6..0fae0630 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -17,7 +17,7 @@ from twisted.internet import threads from . import Command, registerCommand from . import CommandCanceled -from .utils import set_encrypt +from .utils import update_keys from .. import commands from .. import buffers @@ -916,12 +916,12 @@ class ComposeCommand(Command): logging.debug("Trying to encrypt message because encrypt=%s and " "encrypt_by_default=%s", self.encrypt, account.encrypt_by_default) - yield set_encrypt(ui, self.envelope, block_error=self.encrypt) + yield update_keys(ui, self.envelope, block_error=self.encrypt) elif account.encrypt_by_default == u"trusted": logging.debug("Trying to encrypt message because " "account.encrypt_by_default=%s", account.encrypt_by_default) - yield set_encrypt(ui, self.envelope, block_error=self.encrypt, + yield update_keys(ui, self.envelope, block_error=self.encrypt, signed_only=True) else: logging.debug("No encryption by default, encrypt_by_default=%s", diff --git a/alot/commands/utils.py b/alot/commands/utils.py index 891f8e37..decaeae2 100644 --- a/alot/commands/utils.py +++ b/alot/commands/utils.py @@ -13,7 +13,7 @@ from .. import crypto @inlineCallbacks -def set_encrypt(ui, envelope, block_error=False, signed_only=False): +def update_keys(ui, envelope, block_error=False, signed_only=False): """Find and set the encryption keys in an envolope. :param ui: the main user interface object |