talk
talk copied to clipboard
[CORL-3136] Fix Akismet spam/not-spam comment submissions
trafficstars
What does this PR do?
Update approve/reject spam submission to use FLAG__COMMENT_... for retrieving action count status instead of COMMENT_....
When we access the raw actionCounts record, we have to use the serialized values or else they will come back as undefined.
These changes will impact:
- [X] commenters
- [X] moderators
- [ ] admins
- [X] developers
What changes to the GraphQL/Database Schema does this PR introduce?
None
Does this PR introduce any new environment variables or feature flags?
No
If any indexes were added, were they added to INDEXES.md?
N/A
How do I test this PR?
- run Coral in a dev mode so you can attach with a debugger
- add a break point to
server/src/core/server/stacks/approveComment.tson line 70- on the
submitCommentAsNotSpamcall
- on the
- add a break point to
server/src/core/server/stacks/rejectComment.tson line 132- on the
submitCommentAsSpamcall
- on the
- add a break point to
- enable Akismet spam detection (both radio buttons on)
- use an akismet key from one of the dev instances
- make a commenter user
- with that user, post a long comment
- may I suggest 3-5 paragraphs of Star Trek ipsum? https://vlad-saling.github.io/star-trek-ipsum/
- edit the comment and paste in a link at the bottom of the comment
- I used a random music video from YouTube as a URL
- see that the comment is submitted for moderation
- in the admin, see that the comment has been detected as spam
- in the details for the marker
- approve/reject and see that the debug breakpoints you placed are hit
- this confirms we are submitting corrections to Akismet
- if you want to check the Akismet submission results, you can hop into those functions and debug out the results from the
AkismetClientsubmission- spoiler: it's a boring and simple boolean true/false value
Were any tests migrated to React Testing Library?
No
How do we deploy this PR?
Merge into develop and then release develop into main as usual.
Deploy Preview for gallant-galileo-14878c canceled.
| Name | Link |
|---|---|
| Latest commit | f5921c4060f4b809fc8c80814015f42d4ecc6ab2 |
| Latest deploy log | https://app.netlify.com/sites/gallant-galileo-14878c/deploys/662bd4fe87e5000008043047 |