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) } }