diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2019-05-27 16:36:01 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2019-06-02 14:42:50 +0100 |
commit | a48547a145c6192da418cf52ad9e12e061b83ddc (patch) | |
tree | 85d1956c44aeec011984ba3d0828e73bd958a1dd /alot/commands/thread.py | |
parent | 9b75fec97b4ad23178a730623ba691fbe666a747 (diff) |
fix: use from-header from disk when replying
see issue #1402
If the "author" string (a decoded version of the From header value) is
read from the notmuch index, it may have already removed quotes around
real name parts containing a comma.
This means that `alot.db.message.get_author()` will potentially
misinterpret it because python's email libs decoding behaviour is
different.
For example, 'Ä, B <a@b.c>' will yield address 'Ä' and empty name!.
This commit makes sure that the original from header is read from disk
when one replies to a message, which avoids the above problem.
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r-- | alot/commands/thread.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index c4ece713..21d351e2 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -136,7 +136,7 @@ class ReplyCommand(Command): mail = self.message.get_email() # set body text - name, address = self.message.get_author() + name, address = parseaddr(mail['From']) timestamp = self.message.get_date() qf = settings.get_hook('reply_prefix') if qf: |