I tried with the lastest message_notify and entity API versions but I found no reference of this format property anywhere.
I wrote this to send a notification to an user who was requested in an user relationship but as message_notify_send_message
was throwing an Exception caught by user_relationships module, the relationship was not saved.
/**
* Implements hook_user_relationships_save().
*/
function feature_notifications_user_relationships_save($relationship, $action) {
if ($action == 'request') {
// Prepare message
$message = message_create('notify_relationship_ask', array('uid' => $relationship->requestee->uid));
$wrapper = entity_metadata_wrapper('message', $message);
$wrapper->field_seen = FALSE;
$wrapper->field_show_actions = TRUE;
$wrapper->field_user_ref = $relationship->requester;
$wrapper->field_user_relationship_id = $relationship->rid;
$wrapper->save();
$options = array(
'rendered fields' => array(
'message_notify_email_subject' => 'field_message_rendered_subject',
'message_notify_email_body' => 'field_message_rendered_body',
),
);
message_notify_send_message($message, $options);
}
}
Patch following.
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.