summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.org2
-rw-r--r--mumi/messages.scm12
2 files changed, 11 insertions, 3 deletions
diff --git a/TODO.org b/TODO.org
index 04d1430..8f07d6c 100644
--- a/TODO.org
+++ b/TODO.org
@@ -19,5 +19,3 @@ other pages of issues.
* Add links to all tag queries (such as "easy")
-* broken issues:
-37479
diff --git a/mumi/messages.scm b/mumi/messages.scm
index 7dcbf18..1e528b3 100644
--- a/mumi/messages.scm
+++ b/mumi/messages.scm
@@ -96,7 +96,17 @@ yet. Return new results alongside cached results."
(extract-name (sender message)))
(define (date message)
- (or (header message 'date) "unknown date"))
+ (let ((d (header message 'date)))
+ (cond
+ ((date? d) d)
+ ((boolean? d)
+ (current-date))
+ ((and (string? d)
+ (string->number d)) =>
+ (lambda (seconds)
+ (let* ((time (make-time time-utc 0 seconds))
+ (date (time-utc->date time)))
+ date))))))
(define (subject message)
(or (header message 'subject) "(no subject)"))