You are here

function hook_privatemsg_message_insert in Privatemsg 7

Same name and namespace in other branches
  1. 6.2 privatemsg.api.php \hook_privatemsg_message_insert()
  2. 6 privatemsg.api.php \hook_privatemsg_message_insert()
  3. 7.2 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

3 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_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 269
Privatemsg API Documentation

Code

function hook_privatemsg_message_insert($message) {
  _mymodule_save_data($message->mid);
}