You are here

function privatemsg_rules_tag_thread in Privatemsg 6.2

Same name and namespace in other branches
  1. 7.2 privatemsg_rules/privatemsg_rules.rules.inc \privatemsg_rules_tag_thread()
  2. 7 privatemsg_rules/privatemsg_rules.rules.inc \privatemsg_rules_tag_thread()

Helper function to tag a thread.

File

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

Code

function privatemsg_rules_tag_thread($thread_id, $tag, $account) {
  rules_log(t('Tagging %thread_id with %tag for %name', array(
    '%thread_id' => $thread_id,
    '%tag' => $tag->tag,
    '%name' => $account->name,
  )));
  privatemsg_filter_add_tags(array(
    $thread_id,
  ), $tag->tag_id, $account);
}