loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

interpret Precedence: auto_reply as an auto reply (#7137)

Some email clients like to be special and only set the "Precedence" header to "auto_reply" when sending automatic replies.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7137
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: christopher-besch <mail@chris-besch.com>
Co-committed-by: christopher-besch <mail@chris-besch.com>

authored by

christopher-besch
christopher-besch
and committed by
Otto
fc4458bf 932201fa

+10
+4
services/mailer/incoming/incoming.go
··· 297 297 if autoReply == "yes" { 298 298 return true 299 299 } 300 + precedence := env.GetHeader("Precedence") 301 + if precedence == "auto_reply" { 302 + return true 303 + } 300 304 autoRespond := env.GetHeader("X-Autorespond") 301 305 return autoRespond != "" 302 306 }
+6
services/mailer/incoming/incoming_test.go
··· 65 65 }, 66 66 Expected: true, 67 67 }, 68 + { 69 + Headers: map[string]string{ 70 + "Precedence": "auto_reply", 71 + }, 72 + Expected: true, 73 + }, 68 74 } 69 75 70 76 for _, c := range cases {