File tree 3 files changed +10
-3
lines changed 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import (
14
14
"code.gitea.io/gitea/modules/log"
15
15
"code.gitea.io/gitea/modules/notification/action"
16
16
"code.gitea.io/gitea/modules/notification/base"
17
- "code.gitea.io/gitea/modules/notification/ui"
18
17
"code.gitea.io/gitea/modules/repository"
19
18
)
20
19
@@ -28,7 +27,6 @@ func RegisterNotifier(notifier base.Notifier) {
28
27
29
28
// NewContext registers notification handlers
30
29
func NewContext () {
31
- RegisterNotifier (ui .NewNotifier ())
32
30
RegisterNotifier (action .NewNotifier ())
33
31
}
34
32
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ import (
48
48
repo_service "code.gitea.io/gitea/services/repository"
49
49
"code.gitea.io/gitea/services/repository/archiver"
50
50
"code.gitea.io/gitea/services/task"
51
+ "code.gitea.io/gitea/services/uinotification"
51
52
"code.gitea.io/gitea/services/webhook"
52
53
)
53
54
@@ -119,6 +120,7 @@ func InitWebInstalled(ctx context.Context) {
119
120
mailer .NewContext (ctx )
120
121
mustInit (cache .NewContext )
121
122
notification .NewContext ()
123
+ mustInit (uinotification .Init )
122
124
mustInit (archiver .Init )
123
125
124
126
highlight .NewContext ()
Original file line number Diff line number Diff line change 1
1
// Copyright 2018 The Gitea Authors. All rights reserved.
2
2
// SPDX-License-Identifier: MIT
3
3
4
- package ui
4
+ package uinotification
5
5
6
6
import (
7
7
"context"
@@ -14,6 +14,7 @@ import (
14
14
"code.gitea.io/gitea/modules/container"
15
15
"code.gitea.io/gitea/modules/graceful"
16
16
"code.gitea.io/gitea/modules/log"
17
+ "code.gitea.io/gitea/modules/notification"
17
18
"code.gitea.io/gitea/modules/notification/base"
18
19
"code.gitea.io/gitea/modules/queue"
19
20
)
@@ -32,6 +33,12 @@ type (
32
33
}
33
34
)
34
35
36
+ func Init () error {
37
+ notification .RegisterNotifier (NewNotifier ())
38
+
39
+ return nil
40
+ }
41
+
35
42
var _ base.Notifier = & notificationService {}
36
43
37
44
// NewNotifier create a new notificationService notifier
You can’t perform that action at this time.
0 commit comments