summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-05-15 19:32:33 +0200
committerAnton Khirnov <anton@khirnov.net>2021-05-15 19:32:33 +0200
commit2f38333f8e8ddb817e752389f6d5b688d79edb33 (patch)
tree9780844550e2cf94d3cc686fa0c0005c5acc71b9
parentaef67de454a00af06be1a72397ffcb930b15abf5 (diff)
commands/thread: pass bytes to Attachment, not str
Attachment payload should always be bytes.
-rw-r--r--alot/commands/thread.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index be1153aa..d0926692 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -356,9 +356,7 @@ class ForwardCommand(Command):
envelope.attach(a)
else: # attach original mode
- # attach original msg
- data = mail.as_string()
- a = Attachment(data, 'message/rfc822', None, ())
+ a = Attachment(message.as_bytes(), 'message/rfc822', None, ())
envelope.attach(a)
# copy subject