You are here

function notifications_autosubscribe_comment in Notifications 6.4

Same name and namespace in other branches
  1. 6.2 notifications_autosubscribe/notifications_autosubscribe.module \notifications_autosubscribe_comment()
  2. 6.3 notifications_autosubscribe/notifications_autosubscribe.module \notifications_autosubscribe_comment()

Implementation of hook_comment().

File

notifications_autosubscribe/notifications_autosubscribe.module, line 24
Notifications Autosubscribe module.

Code

function notifications_autosubscribe_comment($comment, $op) {
  global $user;

  // $comment can be an object or an array.
  $comment = (object) $comment;
  if ($user->uid && $op == 'insert' && $comment->uid == $user->uid) {
    notifications_autosubscribe($user, 'thread', 'nid', $comment->nid);
  }
}