summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--comment_notify.module6
1 files changed, 6 insertions, 0 deletions
diff --git a/comment_notify.module b/comment_notify.module
index d4a5a2f..c391fcf 100644
--- a/comment_notify.module
+++ b/comment_notify.module
@@ -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, $op) {
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';