I fail to understand the role of "notifiers" in message_subscribe_email and how they interact with the way messages are sent.
From what I've seen, message_subscribe_process_message
always sends emails, whether there is an "email" notifier in the $uids options or not.
Maybe some (pseudo) code would help :
/**
* Implements hook_entity_insert().
*/
function coopnet_subscribe_entity_insert($entity, $type) {
//...
$message = message_create('coopnet_notifications_message', array('arguments' => $arguments), user_load($entity->uid));
message_subscribe_process_message($type, $entity, $message, array('email' => array()), array('save message' => FALSE), $context);
}
Although the user 4003 has not flagged my content with an "email_*" flag related to my content, email is sent anyway.
In message_subscribe_message_subscribe_get_subscribers
, the $uids array looks like this :
array (
//...
3521 =>
array (
'notifiers' =>
array (
'email' => 'email',
),
'flags' =>
array (
0 => 'follow_user',
),
),
4003 =>
array (
'notifiers' =>
array (
),
'flags' =>
array (
0 => 'follow_user',
),
),
)
But user 4003 is sent an email.
Am I missing something here ?
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.