mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-21 12:24:38 +02:00
Refactor
This commit is contained in:
parent
0081ef87fb
commit
ed7b2bc242
@ -7,6 +7,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"maps"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -308,12 +309,8 @@ func generateAdditionalHeadersForIssue(ctx *mailComment, reason string, recipien
|
|||||||
issueID := strconv.FormatInt(ctx.Issue.Index, 10)
|
issueID := strconv.FormatInt(ctx.Issue.Index, 10)
|
||||||
headers := generateMetadataHeaders(repo)
|
headers := generateMetadataHeaders(repo)
|
||||||
|
|
||||||
for k, v := range generateSenderRecipientHeaders(ctx.Doer, recipient) {
|
maps.Copy(headers, generateSenderRecipientHeaders(ctx.Doer, recipient))
|
||||||
headers[k] = v
|
maps.Copy(headers, generateReasonHeaders(reason))
|
||||||
}
|
|
||||||
for k, v := range generateReasonHeaders(reason) {
|
|
||||||
headers[k] = v
|
|
||||||
}
|
|
||||||
|
|
||||||
headers["X-Gitea-Recipient-Address"] = recipient.Email
|
headers["X-Gitea-Recipient-Address"] = recipient.Email
|
||||||
headers["X-Gitea-Issue-ID"] = issueID
|
headers["X-Gitea-Issue-ID"] = issueID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user