Skip to content

fix(say): delegate comment moderation to Firekylin Core - #41

Merged
lizheming merged 1 commit into
mainfrom
fix/say-native-comment-moderation
Nov 21, 2026
Merged

lizheming merged 1 commit into
mainfrom
fix/say-native-comment-moderation

Conversation

@lizheming

Copy link
Copy Markdown
Contributor

Summary

  • Limit the Say comment.beforeCreate hook to the enabled, public, and per-item comment gates. Leave approved, waiting, and spam statuses unchanged so the existing core policy and other comment filters can make the moderation decision.
  • Route legacy POST /api/plugins/say/comments/:id through the same Core creation pipeline, with a server-derived target shared with the Waline UI. Keep same-origin JSON, the in-flight lock, authentication and form validation, legacy HTTP error mapping, a neutral success envelope, and approved-only legacy reads. Sync the public count after Core creates the comment.
  • Documents that native hooks, audit settings, optional AI moderation, CAPTCHA, and notifications now apply consistently. No database rewrite, core change, version bump, merge, or release.

Validation

  • Full repository test scripts, run directly with Node against bundled workspace dependencies and Firekylin Core 2.19.2: 512 passed, 0 skipped; focused comments/Waline tests: 14 passed.
  • Core service tests cover guest/admin policy, character and metadata validation, CAPTCHA, blocked IPs, rate and duplicate limits, AI verdict and failure, creation hooks, and public counts. AI and CAPTCHA calls are mocked.
  • Independent real SQLite HTTP checks for both native and legacy routes verified approved with audit off, waiting with audit on, spam for configured forbidden words, association and count (six cases).

@lizheming
lizheming marked this pull request as ready for review November 21, 2026 03:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T03:35:05.072945Z fd10b3b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lizheming
lizheming merged commit ff72cc6 into main Nov 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant