coralproject / talk

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

[CORL-3165]: only notify on approval when comment previously pending #4605

Closed kabeaty closed 3 months ago

kabeaty commented 3 months ago

What does this PR do?

This checks that the previous status of the comment was a PENDING_STATUS (premod or system withheld) and only creates a notification when a comment is approved in this case.

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?

Create pending comments as a user (put the user on premod, for example). As another user, approve these comments. See that you get the expected notification of approval.

Report a user's comment. Then approve that comment as another user. See that there is no notification.

Create a comment with a suspect word. Then approve that comment as another user. See that there is no notification.

Were any tests migrated to React Testing Library?

How do we deploy this PR?

netlify[bot] commented 3 months ago

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
Latest commit 75e6e43ff897b8e1e9b8441e9e624795e5b93d25
Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/6630f81d216c0f00081853da