From 887c027ec24a5f3dddc567ac339ee4bd3a98d607 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 28 May 2024 08:19:03 +0200 Subject: [PATCH] mailer: Switch X-Mailer to "Forgejo" Fixes #3930. Signed-off-by: Gergely Nagy --- services/mailer/mail.go | 2 +- services/mailer/mail_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/mailer/mail.go b/services/mailer/mail.go index b04925881..1f0d3278b 100644 --- a/services/mailer/mail.go +++ b/services/mailer/mail.go @@ -403,7 +403,7 @@ func generateAdditionalHeaders(ctx *mailCommentContext, reason string, recipient // https://datatracker.ietf.org/doc/html/rfc2369 "List-Archive": fmt.Sprintf("<%s>", repo.HTMLURL()), - "X-Mailer": "Gitea", + "X-Mailer": "Forgejo", "X-Gitea-Reason": reason, "X-Gitea-Sender": ctx.Doer.Name, "X-Gitea-Recipient": recipient.Name, diff --git a/services/mailer/mail_test.go b/services/mailer/mail_test.go index ed972dbb9..bc5d2a133 100644 --- a/services/mailer/mail_test.go +++ b/services/mailer/mail_test.go @@ -360,6 +360,7 @@ func TestGenerateAdditionalHeaders(t *testing.T) { expected := map[string]string{ "List-ID": "user2/repo1 ", "List-Archive": "", + "X-Mailer": "Forgejo", "X-Gitea-Reason": "dummy-reason", "X-Gitea-Sender": "user2", "X-Gitea-Recipient": "test",