Hi,

You've created a really useful module and thanks for that, however I have one question:

does nodecomment work with the Organic Groups module?

Members of organic groups are not emailed when a new nodecomment is added, whereas with the standard comment they are.

Cheers,

James
ps I don't know if it's the same issue as with the og_forum here http://drupal.org/node/221948

Comments

halfiranian’s picture

Not sure if this will help: http://drupal.org/node/240474

halfiranian’s picture

I'm assuming this is where the problem is arising in the organic groups module? It's expecting a comment to be a standard comment and not a nodecomment. Any idea how to overcome this?


function og_comment($comment, $op) {
  switch ($op) {
    case 'publish':
      $comment = (array) $comment;
      // fall through
    case 'insert':
      $skip_notification = FALSE; 
      // Any module that returns true from its hook_og_notify($node) will prevent sending notifications.
      // og2list uses this to send its own notifications instead for mailing list content.
      $node = node_load($comment['nid']);

      foreach(module_implements('og_notify') as $module) {
        if (module_invoke($module, 'og_notify', $node)) {
          $skip_notification = TRUE;
          break;
        }
      }
      // remove the perm check after 5.3 is released.
      if ($comment['status'] == COMMENT_PUBLISHED && !$skip_notification && !og_is_omitted_type($node->type) && og_node_type_notify($node->type) && user_access('post comments without approval') && isset($node->og_groups) && !empty($node->og_groups)) {
        if (module_exists('job_queue')) {
          $description = t('OG: notify group subscribers about comment %id on !link', array('%id' => $comment['cid'], '!link' => l($node->title, "node/$node->nid", NULL, NULL, 'comment-'. $comment['cid'])));
          job_queue_add('og_mail', $description, array('comment', $comment['cid']));
        }
        else {
          og_mail('comment', (object)$comment);
        }
      }
      break;
  }  
}

crea’s picture

Status: Active » Closed (fixed)

D5 branch is not supported anymore. Closing.
Please reopen if the issue is relevant with Nodecomment 6.x-2 branch.