coralproject / talk

A better commenting experience from Vox Media
https://coralproject.net
Other
1.89k stars 354 forks source link

fix: spam ban mod reason #4421

Closed marcushaddon closed 11 months ago

marcushaddon commented 11 months ago

What does this PR do?

This PR includes a rejectionReason when rejecting a user's comments as part of a ban with rejectExistingComments = true. This addresses the issue with both spam banning and managing a users ban via the community view.

These changes will impact:

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?

  1. Start the server with cron jobs running
  2. As a user with mod priveledges, navigate to the stream and spam ban a user.
  3. Observe that the ban goes through, and that the users comments are rejected. Additionally, the resulting commentModerationActions should have a reason attached stating that the user was banned.
  4. As a user with mod priveledges, ban a user across all sites via the community view
  5. Observe that the ban goes through, and that the users comments are rejected. Additionally, the resulting commentModerationActions should have a reason attached stating that the user was banned.
  6. As a user with mod priveledges, ban a user across selected sites via the community view
  7. Observe that the ban goes through, and that the users comments on the selected sites are rejected. Additionally, the resulting commentModerationActions should have a reason attached stating that the user was banned.

Where any tests migrated to React Testing Library?

No.

How do we deploy this PR?

No special considerations should be needed.

netlify[bot] commented 11 months ago

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
Latest commit f1e045c51bc5a146b00e76f75aec60dbd70d4f2f
Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/655d05a9ff5e720008aa607d