0

I (admin) sent a message to couple of users by their username (not by role) . If "user1" replies back to the admin , user2 and user3 will see the message too ,

that's why the module is called PrivateMessage right :)

any clue ? thanks

1

This is by module design and works as expected.

If you add multiple recipients to a message, Privatemsg treats it as a "conference" discussion and notifies everyone in the group when someone replies.

If you want to keep the conversation only between you and a particular user, you must send it only to that particular user.


What you need to do is to hook into the submit function of the form and instead of generating messages for all recipients at once, loop through them and do that for each separately.

You should not modify source code, as that might make it work incosistently and will create maintenance problems for you later on.

What I suggest is to create a custom module, add your submit callback for privatemsg_new() form and process the messages separately. Check out privatemsg_new_submit() function in the source. Also make sure the default privatemsg submit handler does not get executed - just unset it form the $form['actions']['submit']['#submit'] array.

| improve this answer | |
  • Thanks for pointing this. Any clue where should i start changing in module files. ? – brainHax Nov 20 '13 at 7:37
  • What exactly are you trying to achieve? To add multiple recipients and create separate private threads for each automatically? – Aram Boyajyan Nov 20 '13 at 8:23
  • yes. you are right. – brainHax Nov 20 '13 at 8:25
  • Answer updated. – Aram Boyajyan Nov 20 '13 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.