From d1f43bf7f51766eff183161908e85703c620cfc3 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 15 Feb 2022 17:14:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=B8=8A=E4=BC=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E7=9A=84=E9=80=9A=E7=9F=A5=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- modules/notification/action/action.go | 2 +- modules/notification/notification.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/notification/action/action.go b/modules/notification/action/action.go index ba279a3c7..4c40df114 100644 --- a/modules/notification/action/action.go +++ b/modules/notification/action/action.go @@ -315,7 +315,7 @@ func (a *actionNotifier) NotifySyncDeleteRef(doer *models.User, repo *models.Rep } } -func NotifyUploadAttachment(doer *models.User, repo *models.Repository, attachment *models.Attachment) { +func (a *actionNotifier) NotifyUploadAttachment(doer *models.User, repo *models.Repository, attachment *models.Attachment) { if err := models.NotifyWatchers(&models.Action{ ActUserID: repo.OwnerID, ActUser: repo.MustOwner(), diff --git a/modules/notification/notification.go b/modules/notification/notification.go index 7b0203a5c..3179dd5f9 100644 --- a/modules/notification/notification.go +++ b/modules/notification/notification.go @@ -6,6 +6,7 @@ package notification import ( "code.gitea.io/gitea/models" + "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/notification/indexer" @@ -39,7 +40,9 @@ func NewContext() { // NotifyUploadAttachment notifies attachment upload message to notifiers func NotifyUploadAttachment(doer *models.User, repo *models.Repository, attachment *models.Attachment) { + log.Info("send attachment to db.") for _, notifier := range notifiers { + log.Info("send attachment to notifiers.") notifier.NotifyUploadAttachment(doer, repo, attachment) } }