mirror of
https://github.com/go-gitea/gitea
synced 2025-07-29 13:48:36 +00:00
* Ignore mentions for users with no access * Fix fmt
This commit is contained in:
@@ -123,11 +123,18 @@ func (issue *Issue) MailParticipants(doer *User, opType ActionType) (err error)
|
||||
}
|
||||
|
||||
func (issue *Issue) mailParticipants(e Engine, doer *User, opType ActionType) (err error) {
|
||||
mentions := markup.FindAllMentions(issue.Content)
|
||||
|
||||
if err = UpdateIssueMentions(e, issue.ID, mentions); err != nil {
|
||||
rawMentions := markup.FindAllMentions(issue.Content)
|
||||
userMentions, err := issue.ResolveMentionsByVisibility(e, doer, rawMentions)
|
||||
if err != nil {
|
||||
return fmt.Errorf("ResolveMentionsByVisibility [%d]: %v", issue.ID, err)
|
||||
}
|
||||
if err = UpdateIssueMentions(e, issue.ID, userMentions); err != nil {
|
||||
return fmt.Errorf("UpdateIssueMentions [%d]: %v", issue.ID, err)
|
||||
}
|
||||
mentions := make([]string, len(userMentions))
|
||||
for i, u := range userMentions {
|
||||
mentions[i] = u.LowerName
|
||||
}
|
||||
|
||||
if len(issue.Content) > 0 {
|
||||
if err = mailIssueCommentToParticipants(e, issue, doer, issue.Content, nil, mentions); err != nil {
|
||||
|
Reference in New Issue
Block a user