ISSUE SUMMARY: This thread discusses adding/removing people from privatemsg threads as well as privatemsg forwarding. There are (not quite working) patches for 6.x and 7.x.

***

Hi

I would like to see an option to add somebody to some privatemsg discussion
If now I send a privatemsg to some people, there is no chance to add there somebody later (or remove somebody)

It will be great to add this feature to roadmap of privatemsg module.

thanks
Igor
http://www.somvprahe.sk

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

litwol’s picture

Please elaborate on this feature more. for example:
1) when adding a new user to conversation, do can they see all previou conversation or only new messages.
2) when removing user from conversation, do they keep old messages in the inbox, do they get notified that they were removed from the thread, etc etc...

Discuss this in more detail.

Berdir’s picture

I have a working forward module, that allows to to forward a thread to someone and optionally remove yourself. I will release it soon.

Berdir’s picture

Status: Active » Needs review
FileSize
1.33 KB

Ok, here is a first version.

Note: This has been tested, but only against a patched version of privatemsg.module. It *should* work with the current -dev version, but It has not been tested.

Features:
- Displays a Forward Thread form below the reply form
- Allows to forward a thread to 1-n users
- Optionally allows to remove yourself from the thread. The checkbox is currently enabled by default.
- It is also possible to write a reply and forward a thread at the same time.

igorik’s picture

Hi Berdir.

Thanks for your module. It will be probably exactly what I am looking for.

Unfortunately, it doesn't work with latest dev privatemsg.
The only thing which works is removing from thread. But (maybe it is a feature?) there isn't possible to remove myself without forwarding to somebody (there has to be some name in input for forwarding).

What doesn't work at all, is forwarding. I tried to forward some thread to some user (all roles had access for forwarding) but the recipient never got forwarding thread into his messages and he was not added into users in thread.
I am not sure if there is some info message about successfully forwarding(it could be helpful), but I never see anything, after forwarding I was moved to mysite/messages

I will be looking forward to see next version of this your handy module.
thanks and have a nice day
Igor

igorik’s picture

Hi Litwol
thanks for detailing questions. I didn't think so much about it, now I did it and my opinions are:

1) when adding a new user to conversation, do can they see all previou conversation or only new messages.
I think that a new added user could see all thread of conversation.
But the possible option is to choose (radiobutton) if forwarding user will see
a) all conversation
b), or nothing (in this case would be useful if there will be some small textarea for writing some info about topic of forwarding conversation, for keeping a new recipient in context) and he will see only new conversation after date he join into.

2) when removing user from conversation, do they keep old messages in the inbox, do they get notified that they were removed from the thread, etc etc...
a) This could be wide solution, depends if only user can remove himself from thread, or admin/owner of discussion/man with proper acces could have to remove some other from discussion.
b)if user is removed by himself, I suppose only to show info message that he is removed from the thread and that thhread is removed from his messages. If the user is removed by somebody else, than he could got a message, that he was removed from thread xxx because - reason.

For my needs (and probably generally for most people needs) will be the part 1a and 2a enough, the 1b and 2b are just an ideas.

Have a nice weekend
Igor

Berdir’s picture

Status: Needs review » Postponed

Ah, I see.

To avoid a bug when a recipient is added multiple times, it does check if he can already see that message. However, that functionality depends on the changes in _privatemsg_load from #298502: Better access to another user's messages.

Marking this postponed on that issue, but you can of course apply the other patch and then try this again.

Hint: Even as it does not work currently, it should still display a confirmation message.

igorik’s picture

Status: Postponed » Active

Hi Berdir,
I applied latest patch from that thread (privatemsg_readall_7.patch) and now your forwarding module works like a charm. Great! Thanks.

The only problem is that the field for forwarding recipients name is required, so you can't remove yourself from thread without typing someone into that field. Btw, I didn't receive any confirmation message after successfully forwarding.

Edit: I change module code, and set required for "To" as false; '#required' => FALSE,
and default value for Remove myself from the thread to false; '#default_value' => FALSE,
So now it works fine for me.

The only thing what doesn't work is that drupal_set_message(drupal_set_message(t('Forwarded thread %subject... ) is not shown to me after forwarding. Maybe there could be yet another one after removing from the thread.

Thanks again and have a nice day.

igorik’s picture

Status: Active » Fixed
Berdir’s picture

Status: Fixed » Postponed

No, it hasn't :)

This is a new feature, so others might be looking for it too, don't set it to fixed unless it has been added to privatemsg CVS.

igorik’s picture

Status: Postponed » Fixed

Maybe one more feature request/bug for this module. When the message has only two recipients - author of the message and 1 recipient, and the recipient (not the author) remove himself from the thread, then the message is removed from it's author messages list too.
I suppose let the message in it's author inbox.

Berdir’s picture

Status: Fixed » Postponed
igorik’s picture

sorry for changing status, I didn't know you wrote reply between my two replies.

igorik’s picture

Hi Berdir,
please note that forwarding doesn't respect user blocking.
Although I can't send a message to someone who block messages of me, I still can add this user into any thread using forwarding.

Berdir’s picture

Status: Postponed » Needs work

read all has been commited, setting this back to needs work.

Berdir’s picture

Version: » 6.x-1.x-dev
Status: Needs work » Needs review
FileSize
1.37 KB
1.59 KB

Ok, updated the the module and made a few changes..

- to field is optional now, to make replying work again. Not sure if it should be allowed to remove themself from a thread without forwarding. maybe different permissions for forward/remove self?

- blocking rules are now checked when forwarding

Not that there is a small bug related to blocking, the recipients are currently validated even if no message is sent, so a warning is displayed if the thread contains participants that block you. This can be fixed with the attached patch.

jaron’s picture

with the newest 6.x-1.x-dev i'm getting the following error whenever i try to forward a thread:

Fatal error: Call to undefined function _privatemsg_load() in /Applications/MAMP/htdocs/10_27ddoMirror/sites/all/modules/privatemsg/privatemsg_forward/privatemsg_forward.module on line 113

does this have something to do with my setup or is there a new conflict with the newest dev build?

thanks.

Berdir’s picture

Status: Needs review » Needs work

This is a conflict. I'll re-roll this soon.

You can simply replace "_privatemsg_load" with "privatemsg_message_load" but there might be other conflicts as well.

jaron’s picture

that did solve the error. i will let you know if i see any other conflicts.

i also am noticing that if someone removes themselves from a thread when forwarding, any message they have written is not included in the forwarded message. if they are simply forwarding the thread to include a new participant, the message is included, but when the "remove myself" box is enabled, the newly typed message is not included. this is a very nuanced difference for a user to intuit. i think it would make more sense for the module to check if there is anything in the message box and include it in the thread prior to making either of the participant side changes. from a user perspective it is much simpler that way.

Berdir’s picture

Updates:

- Rerolled against latest -dev release of privatemsg
- Forwarding a message could result in a strange order of the messages for the "new" user. Requires a patch.
- Added a few test cases as it seems that I'm always breaking a feature when fixing a bug :)

As said already in other places, the sub-module won't make it into the 1.0 release but I will most probably include the patch once that has been tested a bit more. So please report if everything works.

Berdir’s picture

Status: Needs work » Needs review
jaron’s picture

Status: Needs review » Needs work

hi berdir,

the new build seems really good. i'm noticing one issue. if the sender selects to remove themselves from the thread without forwarding it to anyone (just to remove themselves from a multiple participant thread), any comment is lost. however, if the sender selects to remove themselves and selects someone to forward it to, their comment is saved into the thread. is there anyway to just have the comment always saved into the thread?
i think it will be useful for people in multiple participant threads to be able to comment and remove themselves.

everything else seems to be working great.

thanks.

Berdir’s picture

Status: Needs work » Needs review

Yeah, I missed those two use cases in my tests. Fixed the bug and updated the tests.

Berdir’s picture

Uploading the module would help a lot.

jaron’s picture

do we still need to use the patch on privatmsg.module with the current -4 build?

Berdir’s picture

Yes, the patch does fix two bugs in privatemsg.module that are only visible when using this module.

jfulton’s picture

Thanks for this submodule. But why is forwarding a separate action rather than adding a person to the message when replying? Is it possible to allow for the addition of users ON the actual message or response?

Berdir’s picture

you can combine add participant/remove me/reply in any way you want, just enter a reply and press "Forward thread".

Berdir’s picture

Commited the patch in #19 against 6.x-1.x-dev and 7.x-1.x-dev, this module should now work correctly without the need of a patch.

Hint: The D7 Port also contained a few other bugfixes that were necessary due to changes in Drupal 7.

YK85’s picture

subscribing

Status: Needs review » Needs work

The last submitted patch, privatemsg_validate_sorting.patch, failed testing.

igorik’s picture

Hi

Would be great to insert fieldset "Forward user" into some div with own class, e.g. "forward-user",
same as it is with privatemsg attachemts
(or to have own classes for those fieldsets)

it is better for css styling.

thanks
Igor

igorik’s picture

'#prefix' => '<div class="forward-user">',
'#suffix' => '</div>',
joostvdl’s picture

What is the status on this?

And can this be used om the 6.x-2.x-dev release?

Berdir’s picture

Version: 6.x-1.x-dev »

It *should* work but I haven't tested it for quite some time.

I suggest you try it. It it still works, a re-roll as a patch would be great.

Some tests would also help to get this commited :)

igorik’s picture

Hi

I am using this feature, and I can confirm that it works nice with 2.x.

igorik’s picture

FileSize
27.6 KB

Hi

could you please change weight of forward fieldset to similar weight of fielfset Attachments?
Currently it has weight of which it is placed above textarea.
I tried various things but I can't get Forward fildset next to Attachments fieldset and then to have both under
privatemessage textarea.

Pls look at screenshot

thanks for the hint or for the change in this submodule (which works really nice with forwarding/adding new members)
Igor

igorik’s picture

Hi

this latest patch stop to work with latest Privatemsg dev 2.x version. The message "Thread xxx was forwarded to yyy" is shown, bot xxx is not added into recipients.
Removing myself work nice.

Berdir’s picture

Status: Needs work » Needs review
FileSize
12.07 KB

Re-rolled the latest version, all tests pass again.

Edit: Changes:
- Forward thread fieldset is now inside the privatemsg fieldset
- *If* there is a message, the "Send message" button will also work to forward/delete yourself. But only then.

BenK’s picture

Subscribing to help with testing...

BenK’s picture

Status: Needs review » Needs work

Hey Berdir,

The functionality of this new sub-module is working great. I've tested the various buttons and options and things are functioning smoothly.

One thought that occurred to me, however, is that we may want to divide the one permission supplied by this module ('use privatemsg forward') into two different permissions ('forward a thread' and 'remove myself from thread'). This is because the "remove" functionality clutters the UI somewhat and may not be needed in many uses cases (since users can delete a thread, too). I do think the "remove"capability is useful, but maybe should just be optional for certain users who actually need it.

Also, one thing we may want to do before committing is to possibly change references from "thread" to "conversation"... I just think "thread" is not as clear to regular non-technical users who may not have used many forum-based websites. Here is how I would edit a few of the user-facing strings:

A. 'Forwarded thread %subject to !new.'

Change to >> 'This conversation has been forwarded to !new.'

B. 'Removed from thread.'

>> 'You have been removed as a participant in the conversation.'

C. 'Forward thread' (fieldset title)

>> 'Forward conversation to others'

D. 'Remove myself from thread.' (checkbox)

>> 'Remove myself as a conversation participant.'

E. 'This will remove you as a participant of that thread.' (checkbox description)

>> 'You will no longer be listed as a participant in this conversation. However, any messages you have previously posted will still appear in the conversation.'

F. 'Forward thread' (button)

>> 'Forward this conversation'

Cheers,
Ben

Berdir’s picture

Thanks for the review.

I like the rename thread to conversation suggestion, we should do that too in other places where it is used.

My english is very technical, because I learned it in a technical environment. Words like thread, quota, threshold, .. are "normal" for me (see privatemsg limits issue discussion ;)), I only see how bad and technical they are when translated to german :) The german translation of Privatemsg uses "Nachrichtenstrang" or something like that, that makes my head hurt :)

Btw, if you have time, would be nice if you could join #drupal-games.

BenK’s picture

One more thing I wanted to mention: I'm not sure about the usability of putting the "Forward thread" functionality in a collapsed fieldgroup--especially right after the Input format fieldgroup. It just seems a little weird for this type of functionality to be kind of hidden like this (and to appear more like an option than a separate action).

If we wanted to change this, the possibilities include:

1) Make the "forward thread" fieldgroup a button called "Forward This Conversation". The options (recipient name, remove myself from thread) could then display on a separate page or in an overlay (D7). Not sure if the message should appear next to "Send message" or somewhere else.

2) Place a "Forward this message" link next to "Delete message" and "Block author" in the links section of each message. The only issue is that we're at the message level here rather than the thread level. One possibility would be to include a new option that allows users to forward the individual message only or forward the entire thread. This would be an added feature, too, but I'm not sure how feasible this is from a technical perspective. If the link was clicked, the options could then display on a separate page or in an overlay (D7).

3) Create a link called "Forward this conversation" and place it near where "Displaying messages 1 - 1 of 1" is currently shown in a thread. We'd be sort of creating a new place/location for thread-level options.

Thoughts?

--Ben

MarcoMK’s picture

Status: Needs work » Needs review

#38: privatemsg_forward.patch queued for re-testing.

Berdir’s picture

Need to think about #42.

The problem with your idea is that even though the module is *called* privatemsg_forward, it's actually more an invite than a forward. Technically, we don't forward anything or create new messages (unless you have filled out the reply form, then a new message will be sent as well), but we *add* the recipients to the current, existing thread.

Given that, I think that for example "Forward this message" is a totally different thing then, there is simply no point in "inviting users to single messages of a thread" in my opinion, as they will get new messages of that thread as well from then on which might be completely out of context for them.

igorik’s picture

Hi

Patch from #38 stop to working with latest privatemsg dev (9 sept).
I can't see any fieldset for forwarding message, (I have enabled privatemsg_forward module and set permissions, the same for user #1, forward form completly disappears)

thanks
Igor

BenK’s picture

Status: Needs review » Needs work

@Berdir (in #44): Instead of "Forward this message," how about one of these:

* "Add new recipient"
* "Include new recipient"
* "Add conversation participant"
* "Add person to conversation"

If we changed the action to one of these, how about placing an "Add new recipient" button (or one of the alternatives) next to the list of current recipients? So our layout would be communicating to the user, "these are the current conversation participants, want to add another?" ;-)

--Ben

imDhaval’s picture

love to sub

igorik’s picture

Hi,

Privatemsg_forward module from http://drupal.org/node/548188
doesn't work with latest dev version of privatemsg module

btw when it will be fixed, could be it commited into privatemsg module as submodule?

thanks
Igor

igorik’s picture

is it possible and safe to downgrade from current version to version from august, where this adding new users works? I noticed a lot of changes in db with my latest privatemsg upgrade. so I am afraid of it.

This adding new users is wide using feature by my users so it is unwanted surprise that after upgrade it doesn't work.
I can support with $60 if it will be faster solved.

Thanks a lot
Igor

Berdir’s picture

FileSize
13.65 KB

Sorry, I hope that we can add this soon ;)

Here is another re-roll.

Changes:
- Split the current permission into two separate permissions for forward/remove. No automatic conversion is done, you need to update your permissions.
- Updated strings from thread to conversation according to #40.

I haven't addressed #42 yet. We could maybe add a link beneath "Tag this conversation" but this might be easier as a follow-up after this has been commited.

Berdir’s picture

Status: Needs work » Needs review
igorik’s picture

Status: Needs review » Needs work
FileSize
72.38 KB

Hi Berdir, thanks for the patch

removing works nice, but when I type some name into autocomplete field for adding users, I got error - screenshot attached.
it is same with IE or google chrome.

I have set both new permissions "moving" and "removing", for all authenticated users.
I am using latest privatemsg dev 6.x from January 9th.

thanks
Igor

Berdir’s picture

FileSize
13.63 KB

Forgot to change the autocomplete path.

This should work...

Berdir’s picture

Status: Needs work » Needs review
igorik’s picture

Status: Reviewed & tested by the community » Needs review

now it works like a charm. Thanks Berdir.

My 5 cent suggestion: to add

 '#attributes' => array('class' => 'forward-user'),

into function privatemsg_forward_form_privatemsg_new_alter(&$form, &$form_state) {
if (isset($form['thread_id'])) {
$form['forward'] = array(

then can be this new fieldset targeting and styling, because it's new class.

thanks a lot, Berdir.
Please send me your paypal id, I would like to support your work on this module with small donation.

Igor

igorik’s picture

Status: Needs review » Reviewed & tested by the community
Berdir’s picture

Status: Needs review » Reviewed & tested by the community

There is a donation link on the project description page that you can use or click here to donate.

Thanks ;)

Berdir’s picture

Version: » 7.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Ok, I decided to go ahead with this and commit it. Also added a class, but used "privatemsg-forward".

Thanks for testing. This will need to be ported to 7.x-2.x-dev once that branch has been opened.

Håvard’s picture

Has this been ported to 7.x-2.x-dev now?

bochen87’s picture

Is this a feature that has been ported to the D7 branch?

raintonr’s picture

Subscribing. Although I'd like to see a D6 version if possible.

meSte’s picture

I'm working on a patch to make this feature available on the latest stable version. At this time i've simply commented out the perm function and all the '#access' from the hook_form_privatemsg_new_alter function just to make it work (for everyone, not just the superadmin) and see what has to be done, so I'm not going to attach anything now.

Do you think we need to create a different thread to work on this?

Berdir’s picture

This issue is fine I guess.

Feel free to post a patch even if it's not finished, I'll try to do a review to give you feedback.

meSte’s picture

I tried to apply it against the latest stable and the latest dev and it's not working.
Some parts evidently still needs to be ported. Just to say: "hook_perm()" is a D6 function, we need to use "hook_permission()" to make permissions work on D7.

Berdir’s picture

Well yes, it of course needs to be ported properly to Drupal 7, it will not just work.

meSte’s picture

Status: Needs work » Patch (to be ported)
FileSize
2.02 KB

It was much less complicated than I supposed because the only things to change were permissions and one if statement.
Attached is the source I'm testing. Since I've changed only privatemsg_forward.module I'm attaching only my modified version of that file.
This far I've not found any problems but surely this needs more tests before we can say it's "stable".

Berdir’s picture

Status: Patch (to be ported) » Needs work

Please provide it as a patch so that I can review your changes.

meSte’s picture

Status: Patch (to be ported) » Needs work
FileSize
18.86 KB

This should work for 7.x-1.x

meSte’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, privatemsg-548188-67.patch, failed testing.

Berdir’s picture

+++ b/privatemsg.module
@@ -85,16 +85,14 @@ function _privatemsg_generate_user_array($string, $slice = NULL) {
     // If it is an integer, it is a user id.
-    $user_ids = privatemsg_user_load_multiple(array($uid));
-    if ((int)$uid > 0 && ($account = array_shift($user_ids))) {
+    if ((int)$uid > 0 && ($account = array_shift(privatemsg_user_load_multiple(array($uid))))) {
       $participants[privatemsg_recipient_key($account)] = $account;
     }
     elseif (strpos($uid, '_') !== FALSE) {
       list($type, $id) = explode('_', $uid);
       $type_info = privatemsg_recipient_get_type($type);
       if ($type_info && isset($type_info['load']) && is_callable($type_info['load'])) {
-        $temp_load = $type_info['load'](array($id));
-        if ($participant = array_shift($temp_load)) {
+        if ($participant = array_shift($type_info['load'](array($id)))) {
           $participants[privatemsg_recipient_key($participant)] = $participant;
         }
       }

It looks like you diffed against a different version of Privatemsg than what you started with. All these changes in private.module look unrelated or temporary and shouldn't be there..

+++ b/privatemsg_forward/privatemsg_forward.info
+++ b/privatemsg_forward/privatemsg_forward.info
@@ -0,0 +1,6 @@

@@ -0,0 +1,6 @@
+; $Id$
+name = Privatemsg Forward

The $Id$ stuff should be removed, that's a left over from the CVS times. Same for the other files

+++ b/privatemsg_forward/privatemsg_forward.module
@@ -0,0 +1,149 @@
+    'forward a privatemsg thread' => array(
+      'title' => t('Forward a message'), ¶
+      'description' => t('Forward a privatemsg thread to one or more users.'),
+    ),
+    'remove from a privatemsg thread' => array(
+      'title' => t('Remove from thread'), ¶
+      'description' => t('Remove from a privatemsg thread after forwarding it.'),

Trailing spaces.

+++ b/privatemsg_forward/privatemsg_forward.module
@@ -0,0 +1,149 @@
+ * Implements hook_privatemsg_view_messages_alter().

Should be Implements hook_form_FORM_ID_alter().

+++ b/privatemsg_forward/privatemsg_forward.module
@@ -0,0 +1,149 @@
+  if ($form_state['values']['remove']) {
+    db_query("DELETE FROM {pm_index} WHERE thread_id = %d AND recipient = %d AND type IN ('hidden', 'user')", $form_state['values']['thread_id'], $user->uid);
+
+    // Display message and redirect to messages if user has removed himself.

This query needs to be updated to use db_delete().

+++ b/privatemsg_forward/privatemsg_forward.test
@@ -0,0 +1,165 @@
+}
+\ No newline at end of file
\ No newline at end of file

This looks strange, looks like you added the no newsline line into the file. You should remove that and leave an empty line at the end of the file (same for the other files) instead.

meSte’s picture

I must have applied all changes to the wrong version, or something... I'll check later and submit a new patch.

petednz’s picture

is this thread/mission still active?

warmth’s picture

Any news?

ptmkenny’s picture

Title: add/remove somebody to/from some discussion » add/remove somebody to/from discussion (Privatemsg forwarding)
ptmkenny’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs work » Needs review
FileSize
12.44 KB

Re-roll of #68 in accordance with the comments in #71. I have not yet updated the SQL query because I don't understand it. Also, the changes to privatemsg.module (in #53) were not brought over into the D7 version... Does this need to be done?

Berdir’s picture

Status: Needs review » Needs work

You need to add the .test file to the .info file as files[] = filename so that the tests are picked up.

ptmkenny’s picture

Status: Needs work » Needs review
FileSize
12.5 KB

Oops, here it is, this time with the tests included.

Status: Needs review » Needs work

The last submitted patch, privatemsg-548188-78.patch, failed testing.

ptmkenny’s picture

Status: Needs work » Needs review
FileSize
12.5 KB

Fixed the most obvious error in the test (misconfiguration of initial accounts).

Status: Needs review » Needs work

The last submitted patch, privatemsg-548188-80.patch, failed testing.

Berdir’s picture

+++ b/privatemsg_forward/privatemsg_forward.infoundefined
@@ -0,0 +1,8 @@
+files[]=privatemsg_forward.module

The module isn't needed here, only files with classes.

+++ b/privatemsg_forward/privatemsg_forward.moduleundefined
@@ -0,0 +1,148 @@
+    db_query("DELETE FROM {pm_index} WHERE thread_id = %d AND recipient = %d AND type IN ('hidden', 'user')", $form_state['values']['thread_id'], $user->uid);
db_delete('pm_index')
  ->condition('thread_id', ...)
  ->condition('recipient', $user->uid)
  ->condition('type', array('hidden', 'user')
  ->execute();

In the test, you have $recipient1 = $this->drupalCreateUser(...), but the createThread helper method uses $this->recipient1, needs to be that in the test method too.

ptmkenny’s picture

Ah, ok. Then patch #78 should be the "more correct" version then, although it still needs work.

Ok, I see that the module is not needed. I put it in because I just copied from privatemsg_filter. Now that I check more closely, the only two submodules that reference the .module file are privatemsg_filter and pm_block_user.

ptmkenny’s picture

For:

  ->condition('thread_id', ...)

What should be in the ...? I tried to look at the other delete queries but I couldn't find one with a thread_id.

Berdir’s picture

$form_state['values']['thread_id'], as the old query uses.

ptmkenny’s picture

Status: Needs work » Needs review
FileSize
12.52 KB

Ok, here is a patch that addresses all concerns in #82.

Status: Needs review » Needs work

The last submitted patch, privatemsg-548188-86.patch, failed testing.

Berdir’s picture

Ok, getting there :)

So in the form submits, you need to change 'body' to 'body[value]' now.

ptmkenny’s picture

Status: Needs work » Needs review
FileSize
12.6 KB

Made changes as per #88.

Status: Needs review » Needs work

The last submitted patch, privatemsg-548188-89.patch, failed testing.

Anonymous’s picture

Issue summary: View changes

added summary

savioret’s picture

Issue summary: View changes

Hello,

What is the current status of this issue? 2 years in standby.
I recently upgraded from Drupal 6 to 7 and found that privamemsg_forward.module doesn't exist anymore, and then I found this thread.

Anyone is using the patch in a production site ?
Thanks !

ptmkenny’s picture

I was working on updating the patch for 7.x, but I never finished due to a shift in priorities. You're welcome to take up where I left off.

igorik’s picture

I am very interesed about this too, I upgraded from D6 and I am missing this functionality...
ptmkenny, do you think your patch #89 can work even if it failed test?

igorik’s picture

Ok, I tried it and it looks that it is working nice. Thank you @ptmkenny!

mtem27’s picture

I tried the patch in #89 and it works for me.

Thanks @ptmkenny !

rahim123’s picture

Thanks very much @ptmkenny for the patch, I confirm that it basically works with PHP 7.2 and MariaDB 10.2.22.

There is a problem though with private threads that are longer than the configured page size. Users that are added later to long conversations only have access to the page of messages that the user that added him has currently open. This is apparently due to:

    + foreach ($thread[‘messages’] as $mid => $message) {
    + foreach ($new_recipients as $new_recipient) {
    + $new_names[privatemsg_recipient_key($new_recipient)] = privatemsg_recipient_format($new_recipient);
    + privatemsg_message_change_recipient($mid, $new_recipient->recipient, $new_recipient->type);
    + }
    + _privatemsg_handle_recipients($mid, $new_recipients);
    + }

It shares all currently loaded messages, as opposed to all in the thread.

ivnish’s picture

Status: Needs work » Closed (outdated)