? 327211_notify_for_moderated_comments.patch
? 334735_send_on_update_insert_if_published.patch
? comment_notify_no_patch.patch
Index: comment_notify.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/comment_notify/comment_notify.module,v
retrieving revision 1.53
diff -u -p -r1.53 comment_notify.module
--- comment_notify.module	3 Mar 2009 14:34:26 -0000	1.53
+++ comment_notify.module	7 Mar 2009 19:21:24 -0000
@@ -224,6 +224,8 @@ function comment_notify_page() {
 function comment_notify_comment($comment, $op) {
   global $user;
 
+  // In theory, the update or insert operations are duplicates with publish which
+  // would lead to duplicate messages.  _comment_notify_mailalert() protects against that.
   switch ($op) {
     case 'validate':
        // We assume that if they are non-anonymous then they have a valid mail.
@@ -232,6 +234,10 @@ function comment_notify_comment($comment
         form_set_error('mail', t('If you want to subscribe to comments you must supply a valid e-mail address.'));
       }
       break;
+    case 'publish':
+      // And send notifications - the real purpose of the module.
+      _comment_notify_mailalert($comment);
+      break;
     case 'update':
       // In case they have changed their status, save it in the database.
       $sql = 'UPDATE {comment_notify} SET notify = %d WHERE cid = %d';
