mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Move notification interface to services layer (#26915)
Extract from #22266
This commit is contained in:
parent
084eacb5d4
commit
540bf9fa6d
51 changed files with 972 additions and 969 deletions
|
@ -11,8 +11,8 @@ import (
|
|||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/notification"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
notify_service "code.gitea.io/gitea/services/notify"
|
||||
)
|
||||
|
||||
// CreateRefComment creates a commit reference comment to issue.
|
||||
|
@ -63,7 +63,7 @@ func CreateIssueComment(ctx context.Context, doer *user_model.User, repo *repo_m
|
|||
return nil, err
|
||||
}
|
||||
|
||||
notification.NotifyCreateIssueComment(ctx, doer, repo, issue, comment, mentions)
|
||||
notify_service.CreateIssueComment(ctx, doer, repo, issue, comment, mentions)
|
||||
|
||||
return comment, nil
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ func UpdateComment(ctx context.Context, c *issues_model.Comment, doer *user_mode
|
|||
}
|
||||
}
|
||||
|
||||
notification.NotifyUpdateComment(ctx, doer, c, oldContent)
|
||||
notify_service.UpdateComment(ctx, doer, c, oldContent)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ func DeleteComment(ctx context.Context, doer *user_model.User, comment *issues_m
|
|||
return err
|
||||
}
|
||||
|
||||
notification.NotifyDeleteComment(ctx, doer, comment)
|
||||
notify_service.DeleteComment(ctx, doer, comment)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue