Move feed notification service layer (#26908)

Extract from #22266
This commit is contained in:
Lunny Xiao 2023-09-05 21:00:52 +08:00 committed by GitHub
parent 65588b732c
commit f064d716c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 13 deletions

View file

@ -12,7 +12,6 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/notification/action"
"code.gitea.io/gitea/modules/notification/base"
"code.gitea.io/gitea/modules/repository"
)
@ -25,11 +24,6 @@ func RegisterNotifier(notifier base.Notifier) {
notifiers = append(notifiers, notifier)
}
// NewContext registers notification handlers
func NewContext() {
RegisterNotifier(action.NewNotifier())
}
// NotifyNewWikiPage notifies creating new wiki pages to notifiers
func NotifyNewWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, page, comment string) {
for _, notifier := range notifiers {