You are here

function privatemsg_rules_privatemsg_message_insert in Privatemsg 7.2

Same name and namespace in other branches
  1. 6.2 privatemsg_rules/privatemsg_rules.module \privatemsg_rules_privatemsg_message_insert()
  2. 7 privatemsg_rules/privatemsg_rules.module \privatemsg_rules_privatemsg_message_insert()

Implements hook_rules_privatemsg_message_insert().

File

privatemsg_rules/privatemsg_rules.module, line 11
Hooks and callback functions for rules.module integration.

Code

function privatemsg_rules_privatemsg_message_insert($message) {
  foreach ($message->recipients as $recipient) {
    if ($recipient->type == 'user') {
      rules_invoke_event('privatemsg_insert', $message, $recipient);
    }
  }
}