From 702898acc08bafe724b156a56c2e1dfa72f6e6d8 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Wed, 19 Oct 2011 19:20:35 +0100 Subject: fix: forgot decoding of subject in reply/forward --- alot/commands/envelope.py | 1 - alot/commands/thread.py | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'alot') diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index 7b189257..7d9a3232 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -55,7 +55,6 @@ class EnvelopeAttachCommand(Command): arguments=[ (['key'], {'help':'header to refine'})]) class EnvelopeRefineCommand(Command): - def __init__(self, key='', **kwargs): Command.__init__(self, **kwargs) self.key = key diff --git a/alot/commands/thread.py b/alot/commands/thread.py index add2b055..ed1d8766 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -16,6 +16,7 @@ from alot import widgets from alot import completion from alot import helper from alot.message import encode_header +from alot.message import decode_header MODE = 'thread' @@ -59,7 +60,7 @@ class ReplyCommand(Command): reply.attach(bodypart) # copy subject - subject = mail.get('Subject', '') + subject = decode_header(mail.get('Subject', '')) if not subject.startswith('Re:'): subject = 'Re: ' + subject reply['Subject'] = Header(subject.encode('utf-8'), 'UTF-8').encode() @@ -176,7 +177,7 @@ class ForwardCommand(Command): reply.attach(mail) # copy subject - subject = mail.get('Subject', '') + subject = decode_header(mail.get('Subject', '')) subject = 'Fwd: ' + subject reply['Subject'] = Header(subject.encode('utf-8'), 'UTF-8').encode() -- cgit v1.2.3