You are here

function ajax_comments_nodejs_comment_delete in AJAX Comments 7

Implements hook_comment_delete()

File

ajax_comments_nodejs/ajax_comments_nodejs.module, line 58
AJAX Comments Nodejs Integration module file

Code

function ajax_comments_nodejs_comment_delete($comment) {
  $authToken = !empty($_SESSION['nodejs_config']['authToken']) ? $_SESSION['nodejs_config']['authToken'] : 0;
  $nodejs_comment = (object) array(
    'channel' => 'ajax_comments_nodejs_' . $comment->nid,
    'callback' => 'ajaxCommentsNodejs',
    'authToken' => $authToken,
    'commands' => array(
      ajax_command_invoke('.comment-wrapper-' . $comment->cid, 'remove'),
    ),
  );
  nodejs_send_content_channel_message($nodejs_comment);
}