Please upgrade here. These earlier versions are no longer being updated and have security issues.

Don't Send Notifications on Pending Posts?

This discussion is related to the EMailSubscribe addon.

Hi,

I'm currently using the Post Approval plugin, which requires a post to be approved by a moderator before it is visible to others.

I currently have an issue where users are receive email notifications about 'pending' posts. When I took a look at the discussion table, it has a column marked 'Hidden', which I believe corresponds to whether or not a post is pending.

Would you be able to provide a little direction as to where I should look to add this 'check'?

Thanks!

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Both plugins use the event handler PostController_AfterDiscussionSave_Handler. As such, we can't guarantee these handlers will be fired in a specific order (it should call them in alphabetical order based on the plugin name, IIRC).

    I suggest adding a check in the EMailSubscribe plugin to see if the PostApproval plugin is enabled. Adding something like the following after line 55 of /plugins/EMailSubscribe/default.php might work:

    if (Gdn::PluginManager()->CheckPlugin('PostApproval')) return;
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.