Drupal Association members fund grants that make connections all over the world.
I am having problems with privatemsg_filter_add_tags and would love some insight.
I created a module which creates a privatemsg after a function completes. I want to tag that message with one of the tags I created.
<?php $thread = privatemsg_new_thread(array($user), $title, $message); // this works beautifully. privatemsg_filter_add_tags($thread['message']->thread_id, $tag_id, $user); // this doesn't produce the desired results ?>
When I send the message, and look at the message in the UI ( inbox ), there are no tags on the message.
When I look in the database pm_tags_index, there is the thread id, the uid, and tag id.
I double checked that I have a valid tag id, it adds to the db correctly ( seemingly ), why does it now appear in the Inbox with the tag on the thread?
I also checked that if I got the $user's inbox, and add the tag manually, it adds correctly, both in the UI and db. What I am I missing?