增加回复与待审提醒:站内消息与 SMTP 邮件通知。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-06 00:34:16 +08:00
parent 322ac14055
commit c05cc472cf
12 changed files with 608 additions and 18 deletions

View File

@@ -303,6 +303,12 @@ func (h *Handlers) APIAdminApproveComment(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
if h.Notify != nil {
if comment, err := h.Comment.GetByID(uint(id)); err == nil {
comment.Status = model.ContentStatusPublished
h.Notify.AsyncNotifyCommentPublished(comment)
}
}
c.JSON(http.StatusOK, gin.H{"message": "评论已通过审核", "status": model.ContentStatusPublished})
}