From 6f5c3feb2d458900c8321b05d6dbd131e12fab85 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 28 Nov 2022 18:24:09 +0800 Subject: [PATCH] fix: register bots notifier when enabled only --- modules/notification/notification.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/notification/notification.go b/modules/notification/notification.go index e6f305e705..fba5f54f10 100644 --- a/modules/notification/notification.go +++ b/modules/notification/notification.go @@ -41,7 +41,9 @@ func NewContext() { RegisterNotifier(webhook.NewNotifier()) RegisterNotifier(action.NewNotifier()) RegisterNotifier(mirror.NewNotifier()) - RegisterNotifier(bots.NewNotifier()) + if setting.Bots.Enabled { + RegisterNotifier(bots.NewNotifier()) + } } // NotifyNewWikiPage notifies creating new wiki pages to notifiers