mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-17 07:22:42 +00:00
Move mail notification logic to service layer (#26905)
Extract from #22266
This commit is contained in:
parent
0b10df67ce
commit
a66d883a18
3 changed files with 20 additions and 21 deletions
|
@ -15,10 +15,8 @@ import (
|
|||
"code.gitea.io/gitea/modules/notification/action"
|
||||
"code.gitea.io/gitea/modules/notification/base"
|
||||
"code.gitea.io/gitea/modules/notification/indexer"
|
||||
"code.gitea.io/gitea/modules/notification/mail"
|
||||
"code.gitea.io/gitea/modules/notification/ui"
|
||||
"code.gitea.io/gitea/modules/repository"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
)
|
||||
|
||||
var notifiers []base.Notifier
|
||||
|
@ -32,9 +30,6 @@ func RegisterNotifier(notifier base.Notifier) {
|
|||
// NewContext registers notification handlers
|
||||
func NewContext() {
|
||||
RegisterNotifier(ui.NewNotifier())
|
||||
if setting.Service.EnableNotifyMail {
|
||||
RegisterNotifier(mail.NewNotifier())
|
||||
}
|
||||
RegisterNotifier(indexer.NewNotifier())
|
||||
RegisterNotifier(action.NewNotifier())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue