mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
Adding #issuecomment to the URL in E-Mail notifications (#1674)
* Added comment's hashtag to url for mail notifications. Signed-off-by: Jonas <info@jonasfranz.software> * Added comment's hashtag to url for mail notifications. Added explanation to return statement. Signed-off-by: Jonas <info@jonasfranz.software> * Added comment's hashtag to url for mail notifications. Added explanation to return statement + documentation. Signed-off-by: Jonas <info@jonasfranz.software> * Added comment's hashtag to url for mail notifications. Signed-off-by: Jonas Franz <info@jonasfranz.software> * Replacing in-line link generation with HTMLURL. (+gofmt) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Replaced action-based model with nil-based model. (+gofmt) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. Signed-off-by: Jonas Franz <info@jonasfranz.software> * Updating comment for mailIssueCommentToParticipants Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
parent
cb74f1b84d
commit
03912ce014
3 changed files with 19 additions and 12 deletions
|
@ -153,7 +153,7 @@ func (c *Comment) HTMLURL() string {
|
|||
log.Error(4, "GetIssueByID(%d): %v", c.IssueID, err)
|
||||
return ""
|
||||
}
|
||||
return fmt.Sprintf("%s#issuecomment-%d", issue.HTMLURL(), c.ID)
|
||||
return fmt.Sprintf("%s#%s", issue.HTMLURL(), c.HashTag())
|
||||
}
|
||||
|
||||
// IssueURL formats a URL-string to the issue
|
||||
|
@ -289,7 +289,7 @@ func (c *Comment) MailParticipants(e Engine, opType ActionType, issue *Issue) (e
|
|||
case ActionReopenIssue:
|
||||
issue.Content = fmt.Sprintf("Reopened #%d", issue.Index)
|
||||
}
|
||||
if err = mailIssueCommentToParticipants(issue, c.Poster, mentions); err != nil {
|
||||
if err = mailIssueCommentToParticipants(issue, c.Poster, c, mentions); err != nil {
|
||||
log.Error(4, "mailIssueCommentToParticipants: %v", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue