feat: SSR 评论回复与 @ 提及通知
发评/审通接入 NotifyService,系统通知会话支持 kind 筛选。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -357,6 +357,13 @@ func (d Deps) AdminCommentApprove(c *gin.Context) {
|
||||
if err := d.Comment.SetStatus(uint(id), models.ContentStatusPublished); err != nil {
|
||||
ctx.SetFlash(err.Error())
|
||||
} else {
|
||||
if d.Notify != nil {
|
||||
if comment, err := d.Comment.GetByID(uint(id)); err == nil {
|
||||
comment.Status = models.ContentStatusPublished
|
||||
d.Notify.AsyncNotifyCommentPublished(comment)
|
||||
d.Notify.AsyncNotifyCommentMentions(comment)
|
||||
}
|
||||
}
|
||||
ctx.SetFlash("评论已通过")
|
||||
}
|
||||
ctx.Redirect("/admin/moderation")
|
||||
|
||||
Reference in New Issue
Block a user