mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 09:57:07 +02:00
Move actions to notification (#8785)
This commit is contained in:
1 parent
7971b05d2b
commit
491887d441
5 files changed
+118
-37
No files matched your search
@@ -5,10 +5,7 @@
|
||||
package issue
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/notification"
|
||||
)
|
||||
|
||||
@@ -24,18 +21,6 @@ func NewIssue(repo *models.Repository, issue *models.Issue, labelIDs []int64, uu
|
||||
}
|
||||
}
|
||||
|
||||
if err := models.NotifyWatchers(&models.Action{
|
||||
ActUserID: issue.Poster.ID,
|
||||
ActUser: issue.Poster,
|
||||
OpType: models.ActionCreateIssue,
|
||||
Content: fmt.Sprintf("%d|%s", issue.Index, issue.Title),
|
||||
RepoID: repo.ID,
|
||||
Repo: repo,
|
||||
IsPrivate: repo.IsPrivate,
|
||||
}); err != nil {
|
||||
log.Error("NotifyWatchers: %v", err)
|
||||
}
|
||||
|
||||
notification.NotifyNewIssue(issue)
|
||||
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user