diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-05-15 19:34:14 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-05-15 19:36:36 +0200 |
commit | ed2f42f3504c766e9a39f8ed4f3ff97ffa0c3c75 (patch) | |
tree | d4ad4acc560f52f4bfca290dc9c73773015870e9 /alot/commands | |
parent | f1c576ea2fdec530c28aa503c0c76080afede029 (diff) |
commands/thread:ForwardCommand: do not construct EmailMessage unnecessarily
Diffstat (limited to 'alot/commands')
-rw-r--r-- | alot/commands/thread.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index e71bb588..87deab92 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -324,8 +324,6 @@ class ForwardCommand(Command): async def apply(self, ui): message = ui.current_buffer.get_selected_message() - mail = email.message_from_bytes(message.as_bytes(), - policy = email.policy.SMTP) envelope = Envelope(passed = message) @@ -336,6 +334,8 @@ class ForwardCommand(Command): qf = settings.get_hook('forward_prefix') if qf: + mail = email.message_from_bytes(message.as_bytes(), + policy = email.policy.SMTP) quote = qf(name, address, timestamp, message=mail, ui=ui, dbm=ui.dbman) else: |