diff options
author | Reto Brunner <reto@labrat.space> | 2020-07-27 02:48:22 +0300 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-08-10 08:00:52 +0200 |
commit | f1a0fd20d6d30fb1203ffa3cb9f4004476acfdb3 (patch) | |
tree | 2b67a7e61abc02a0a30ae07005c35df8576f321f /lib/open.go | |
parent | 2d7a8707257eec2b9f0ff41772cfd8dab4f1201e (diff) | |
download | aerc-f1a0fd20d6d30fb1203ffa3cb9f4004476acfdb3.tar.gz |
improve date parsing for notmuch/maildir
If a message date would fail to parse, the worker would never receive
the MessageInfo it asked for, and so it wouldn't display the message.
The problem is the spec for date formats is too lax, so trying to ensure
we can parse every weird date format out there is not a strategy we want
to pursue. On the other hand, preventing the user from reading and
working with a message due to the error format is also not a solution.
The maildir and notmuch workers will now fallback to the internal date, which
is based on the received header if we can't parse the format of the Date header.
The UI will also fallback to the received header whenever the date header can't
be parsed.
This patch is based on the work done by Lyudmil Angelov <lyudmilangelov@gmail.com>
But tries to handle a parsing error a bit more gracefully instead of just returning
the zero date.
Diffstat (limited to 'lib/open.go')
0 files changed, 0 insertions, 0 deletions