diff --git a/code/controllers/CommentingController.php b/code/controllers/CommentingController.php index 789f6ba..ca1bf3a 100644 --- a/code/controllers/CommentingController.php +++ b/code/controllers/CommentingController.php @@ -529,11 +529,6 @@ class CommentingController extends Controller { $requireModeration = false; break; } - - // we want to show a notification if comments are moderated - if ($requireModeration) { - Session::set('CommentsModerated', 1); - } $comment = new Comment(); $form->saveInto($comment); @@ -552,6 +547,11 @@ class CommentingController extends Controller { // extend hook to allow extensions. Also see onBeforePostComment $this->extend('onAfterPostComment', $comment); } + + // we want to show a notification if comments are moderated + if ($requireModeration && !$comment->IsSpam) { + Session::set('CommentsModerated', 1); + } // clear the users comment since it passed validation Cookie::set('CommentsForm_Comment', false);