File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import (
1414 "code.gitea.io/gitea/modules/log"
1515 "code.gitea.io/gitea/modules/notification/action"
1616 "code.gitea.io/gitea/modules/notification/base"
17- "code.gitea.io/gitea/modules/notification/ui"
1817 "code.gitea.io/gitea/modules/repository"
1918)
2019
@@ -28,7 +27,6 @@ func RegisterNotifier(notifier base.Notifier) {
2827
2928// NewContext registers notification handlers
3029func NewContext () {
31- RegisterNotifier (ui .NewNotifier ())
3230 RegisterNotifier (action .NewNotifier ())
3331}
3432
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ import (
4848 repo_service "code.gitea.io/gitea/services/repository"
4949 "code.gitea.io/gitea/services/repository/archiver"
5050 "code.gitea.io/gitea/services/task"
51+ "code.gitea.io/gitea/services/uinotification"
5152 "code.gitea.io/gitea/services/webhook"
5253)
5354
@@ -119,6 +120,7 @@ func InitWebInstalled(ctx context.Context) {
119120 mailer .NewContext (ctx )
120121 mustInit (cache .NewContext )
121122 notification .NewContext ()
123+ mustInit (uinotification .Init )
122124 mustInit (archiver .Init )
123125
124126 highlight .NewContext ()
Original file line number Diff line number Diff line change 11// Copyright 2018 The Gitea Authors. All rights reserved.
22// SPDX-License-Identifier: MIT
33
4- package ui
4+ package uinotification
55
66import (
77 "context"
@@ -14,6 +14,7 @@ import (
1414 "code.gitea.io/gitea/modules/container"
1515 "code.gitea.io/gitea/modules/graceful"
1616 "code.gitea.io/gitea/modules/log"
17+ "code.gitea.io/gitea/modules/notification"
1718 "code.gitea.io/gitea/modules/notification/base"
1819 "code.gitea.io/gitea/modules/queue"
1920)
@@ -32,6 +33,12 @@ type (
3233 }
3334)
3435
36+ func Init () error {
37+ notification .RegisterNotifier (NewNotifier ())
38+
39+ return nil
40+ }
41+
3542var _ base.Notifier = & notificationService {}
3643
3744// NewNotifier create a new notificationService notifier
You can’t perform that action at this time.
0 commit comments