// If we got back a legit response then update the comment history
// other wise just bail now and try again later. No point in
// re-trying all the comments once we hit one failure.
if ( !
empty( $event ) ) { delete_comment_meta( $comment_id, 'akismet_error'
);
self::
update_comment_history( $comment_id, '',
$event );
update_comment_meta( $comment_id, 'akismet_result',
$status );
// make sure the comment status is still pending. if it isn't, that means the user has already moved it elsewhere.
$comment =
get_comment( $comment_id );
if ( $comment && 'unapproved' ==
wp_get_comment_status( $comment_id ) ) { if ( $status == 'true'
) { wp_spam_comment( $comment_id );
} elseif ( $status == 'false'
) { // comment is good, but it's still in the pending queue. depending on the moderation settings
// we may need to change it to approved.
if ( check_comment($comment->comment_author,
$comment->comment_author_email,
$comment->comment_author_url,
$comment->comment_content,
$comment->comment_author_IP,
$comment->comment_agent,
$comment->comment_type
) ) wp_set_comment_status( $comment_id, 1
);
else if ( get_comment_meta( $comment_id, 'akismet_delayed_moderation_email', true
) ) wp_notify_moderator( $comment_id );
} } delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email'
);
}