After fiddling a bit with this module, I noticed that whenever a new comment is saved with status of COMMENT_PUBLISHED, any (valid) commenter for that node will receive 2 emails, one due to the hook_comment_insert() implementation and one for the hook_comment_publish() implementation. If you look at comment_save() calls hook_comment_publish() for all published comments.

In thinking about the best solution, my first idea was just remove hook_comment_publish() but since it is called on every comment_save(), it's better to just make that hook the only place that calls _comment_notify_mailalert() and remove the calls from both hook_comment_insert() and hook_comment_update() to keep things clean.

Comments

blasthaus created an issue.