controller: Set email subject to bug subject.
authorRicardo Wurmus <rekado@elephly.net>
Sun, 10 May 2020 06:53:50 +0000 (08:53 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Sun, 10 May 2020 06:53:50 +0000 (08:53 +0200)
mumi/web/controller.scm

index d107c8d0f30bdfa9d0d8b628ffb3b9d9e6c60eaf..12065f856fc5aa350aa9b9b94b432b206c58463a 100644 (file)
          (let ((headers   (request-headers request))
                (form-data (parse-form-submission request body))
                (cookie    (or (session-data %session-manager request)
-                              '())))
+                              '()))
+               (bug       (fetch-bug id)))
            (if (and
+                bug
                 ;; The encrypted cookie must be fresh and contain the
                 ;; current issue id.
                 (and=> (assoc-ref cookie 'issue-id)
                  ;; Send comment to list
                  (enqueue 'mail
                           `((from . ,(string-trim-both (assoc-ref form-data 'from)))
+                            (subject . ,(bug-subject bug))
                             (to . ,(format #f "~a@~a"
                                            id (%config 'debbugs-domain)))
                             (text . ,(assoc-ref form-data 'text))))