Feature/Fix: Flagged posts user notifications (PR #8041)

Changes:

  • FIX: User should get notified when a post is deleted
  • FEATURE: Notify posters when restoring flagged posts

Description:

The PostDestroyer looks for pending reviewables associated with the post (It’ll never find one in this case) and tries to act on them. This logic is correct when manually deleting a post that was flagged, but it won’t work when calling the destroyer from a reviewable action.

The destroyer now receives the reviewable object to get some context and directly notify the poster without trying to act again on the reviewable.

Also, a new PM will be created when disagreeing with the reviewable.

GitHub

You’ve signed the CLA, romanrizzi. Thank you! This pull request is ready for review.

      title: "Flagged post restored by staff"

We usually prefer checking that the job that was queued is the one we’re actually testing (example: d7f6d37a985a3e6233d4285f7d55c9e14905e552).

Same here ^^