Hi,

Here is my setup:

- User A subscribed to node 1 (get email when a comment is posted on node 1)
- User A also subscribed to user B (get email when user B does some action, in this case commenting on a node)
- When user B posts a comment on node 1, user A gets the same email twice, one from node 1 subscription, one from user B subscription.

This is because in my hook_comment_insert(), I send emails out to both node's subscribers and the acting user's subscribers

  function hook_comment_insert($comment) {
    
    ...

    message_subscribe_send_message('user', $account, $message); // notify acting user's subscribers
    message_subscribe_send_message('node', $node, $message); // notify node's subscribers
  }

Is there any way to fix or work around this? Or is this not a correct way to achieve what I want?

Thanks,
Long

Comments

longmtran’s picture

Title: Node's subscriber and acting user 's subscriber get same notification twice when a comment is posted in the node » Node's subscriber and acting user 's subscriber get duplicate notification when a comment is posted in the node
longmtran’s picture

Title: Node's subscriber and acting user 's subscriber get duplicate notification when a comment is posted in the node » Node's subscriber and acting user 's subscriber get duplicated notification when a comment is posted in the node
longmtran’s picture

Title: Node's subscriber and acting user 's subscriber get duplicated notification when a comment is posted in the node » Duplicate notification for node's subscriber and acting user 's subscriber when a comment is posted in the node
bluegeek9’s picture

Status: Active » Closed (outdated)
Issue tags: -duplicate, -notification, -subscribe, -notify