summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-05-13 12:09:28 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-05-13 12:09:28 +0200
commit7e26ec383c2b161378f4113d99540ba2bb3d35be (patch)
tree3c1fa9ac85ddc0cfb1fdb5694160e19d2e2afe3f
parentcd9878f83c9c99410323748d66b8093eea3e9978 (diff)
view/html: issue-page: Filter empty messages for all users.
-rw-r--r--mumi/web/view/html.scm26
1 files changed, 12 insertions, 14 deletions
diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm
index a8dcde2..c297366 100644
--- a/mumi/web/view/html.scm
+++ b/mumi/web/view/html.scm
@@ -319,7 +319,13 @@ failed to process associated messages.")
(define* (issue-page bug #:optional flash-message)
"Render the conversation for the given BUG."
(define id (bug-num bug))
- (define messages (issue-messages id))
+ (define messages
+ (filter (lambda (msg)
+ ;; Ignore messages without body, and internal messages.
+ (and msg
+ (email-body msg)
+ (not (internal-message? msg))))
+ (issue-messages id)))
(define parties (sort (filter (compose (negate bot?) extract-email)
(participants (filter identity messages)))
(lambda (a b)
@@ -574,19 +580,11 @@ currently disabled."))
(div (@ (class "row"))
(div
(@ (class "conversation col-12"))
- ,(let ((msgs (filter (lambda (msg)
- ;; Ignore messages
- ;; without body, and
- ;; internal messages.
- (and msg
- (email-body msg)
- (not (internal-message? msg))))
- messages)))
- (map show-message
- (iota (length msgs))
- msgs
- (cons (bug-subject* bug)
- (map subject msgs))))
+ ,(map show-message
+ (iota (length messages))
+ messages
+ (cons (bug-subject* bug)
+ (map subject messages)))
,comment-box)))))))
(define (list-of-bugs bugs)