]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dashboard/codereview: set In-Reply-To header to properly thread mail.
authorDavid Symonds <dsymonds@golang.org>
Mon, 14 May 2012 00:05:39 +0000 (10:05 +1000)
committerDavid Symonds <dsymonds@golang.org>
Mon, 14 May 2012 00:05:39 +0000 (10:05 +1000)
R=adg
CC=golang-dev
https://golang.org/cl/6208051

misc/dashboard/codereview/dashboard/cl.go

index e92b4e1a4689ee51f6fe640117f6ffc1b73bafc5..0b7eccc733d4dee1addd10426cc0ec9563e6f2f2 100644 (file)
@@ -12,6 +12,7 @@ import (
        "html/template"
        "io"
        "net/http"
+       netmail "net/mail"
        "net/url"
        "regexp"
        "sort"
@@ -192,8 +193,11 @@ func handleAssign(w http.ResponseWriter, r *http.Request) {
                                Subject: cl.Subject + " (issue " + n + ")",
                                Body:    "R=" + rev + "\n\n(sent by gocodereview)",
                        }
-                       // TODO(dsymonds): Use cl.LastMessageID as the In-Reply-To header
-                       // when the appengine/mail package supports that.
+                       if cl.LastMessageID != "" {
+                               msg.Headers = netmail.Header{
+                                       "In-Reply-To": []string{cl.LastMessageID},
+                               }
+                       }
                        if err := mail.Send(c, msg); err != nil {
                                c.Errorf("mail.Send: %v", err)
                        }