Browse Source

提交上传数据集的通知信息

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.2.2^2
zouap 4 years ago
parent
commit
d1f43bf7f5
2 changed files with 4 additions and 1 deletions
  1. +1
    -1
      modules/notification/action/action.go
  2. +3
    -0
      modules/notification/notification.go

+ 1
- 1
modules/notification/action/action.go View File

@@ -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(),


+ 3
- 0
modules/notification/notification.go View File

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


Loading…
Cancel
Save