mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-23 09:30:50 +00:00
Include thread related headers in issue/coment mail (#7484)
* Include thread related headers in issue/coment mail Make it so mail programs will group comments from an issue into the same thread by setting Message-ID on initial issue and then using In-Reply-To and References headers to reference that later on. * Add tests * more tests * fix typo
This commit is contained in:
parent
5d3e351864
commit
944d904980
3 changed files with 115 additions and 1 deletions
|
@ -472,6 +472,18 @@ func (issue *Issue) sendLabelUpdatedWebhook(doer *User) {
|
|||
}
|
||||
}
|
||||
|
||||
// ReplyReference returns tokenized address to use for email reply headers
|
||||
func (issue *Issue) ReplyReference() string {
|
||||
var path string
|
||||
if issue.IsPull {
|
||||
path = "pulls"
|
||||
} else {
|
||||
path = "issues"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s/%s/%d@%s", issue.Repo.FullName(), path, issue.Index, setting.Domain)
|
||||
}
|
||||
|
||||
func (issue *Issue) addLabel(e *xorm.Session, label *Label, doer *User) error {
|
||||
return newIssueLabel(e, issue, label, doer)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue