It is possible to modify recipients in hook_privatemsg_message_presave_alter, but in the submit handler for the form privatemsg_new, the $recipient_names array is build before the message is sent and presave hook is called.

Since objects pass by reference by default, it makes sence to do this after presave hook instead and after the message is sent.

Files: 
CommentFileSizeAuthor
#1 privatemsg-1352444-1.patch1.45 KBtrogels
PASSED: [[SimpleTest]]: [MySQL] 4,913 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.45 KB
PASSED: [[SimpleTest]]: [MySQL] 4,913 pass(es).
[ View ]

Category:feature» bug

Marking this as bug, not a feature, because of http://drupal.org/node/1352444

Version:7.x-1.2» 7.x-1.x-dev

#1: privatemsg-1352444-1.patch queued for re-testing.

Version:7.x-1.x-dev» 7.x-2.x-dev

#1: privatemsg-1352444-1.patch queued for re-testing.

Issue summary:View changes

patch uploaded