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

trogels’s picture

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

Category:feature» bug

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

ptmkenny’s picture

Version:7.x-1.2» 7.x-1.x-dev
ptmkenny’s picture

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

ptmkenny’s picture

Version:7.x-1.x-dev» 7.x-2.x-dev
ptmkenny’s picture

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

ptmkenny’s picture

Issue summary:View changes

patch uploaded