You are here

function hook_privatemsg_message_insert in Privatemsg 6.2

Same name and namespace in other branches
  1. 6 privatemsg.api.php \hook_privatemsg_message_insert()
  2. 7.2 privatemsg.api.php \hook_privatemsg_message_insert()
  3. 7 privatemsg.api.php \hook_privatemsg_message_insert()

This hook is executed after the message has been saved.

$message is updated with mid and thread id. Use this hook to store data, that needs to point to the saved message for example attachments.

Parameters

$message: Message array

Related topics

4 functions implement hook_privatemsg_message_insert()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

pm_email_notify_privatemsg_message_insert in pm_email_notify/pm_email_notify.module
Implements hook_privatemsg_message_insert().
privatemsg_attachments_privatemsg_message_insert in privatemsg_attachments/privatemsg_attachments.module
Implements hook_privatemsg_message_insert().
privatemsg_filter_privatemsg_message_insert in privatemsg_filter/privatemsg_filter.module
Implements hook_privatemsg_message_insert().
privatemsg_rules_privatemsg_message_insert in privatemsg_rules/privatemsg_rules.module
Implements hook_rules_privatemsg_message_insert().
1 invocation of hook_privatemsg_message_insert()
_privatemsg_send in ./privatemsg.module
Internal function to save a message.

File

./privatemsg.api.php, line 359
Privatemsg API Documentation

Code

function hook_privatemsg_message_insert($message) {
  _mymodule_save_data($message['mid']);
}