A very important feature for my users is the ability to edit or delete an outgoing message that has not yet been read by its recipients. Some reasons include fixing spelling, situation changes, and changing their minds on sending a message in the first place.

I apologize if this was already posted, a search on the issue queue turned up nothing relevant.

CommentFileSizeAuthor
#7 edit-messages_569290_7.patch23.05 KBoadaeh

Comments

paragon77’s picture

I have users asking about a feature like this as well.

Any idea if this will be considered?

mlieshout’s picture

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

Any news on this one?

mototribe’s picture

yeah, that would be a really cool feature!

ptmkenny’s picture

Marked http://drupal.org/node/1533118 as a duplicate

kristen pol’s picture

Here's a similar issue for editing any message: #1846636: Permission to edit sent messages

oadaeh’s picture

Assigned: Unassigned » oadaeh
Issue summary: View changes

I started work on this feature about a year ago. I am trying to complete it in the next week and commit a patch (while also traveling). If nothing shows up by the end of January 2016, bump the issue. :)

oadaeh’s picture

Title: Editing of outbox (sent but not read) messages » Editing of existing (sent) Privatemsg messages (read and/or unread)
Status: Active » Needs review
StatusFileSize
new23.05 KB

I'm choosing this message thread as the one to attach my patch to, only because it's the older one. I'm going to mark the other one as a duplicate of this one.

Attached is a patch that allows the editing of Privatemsg messages.

Included in the patch are the following permissions:

  • 'edit own unread privatemsg'
  • 'edit own read privatemsg'
  • 'edit any unread privatemsg'
  • 'edit any read privatemsg'
  • 'resend edited privatemsg messages'

The changes did work for me, but I still have a little more edge case testing to complete.

I also have a few of caveats:

  • The patch was primarily created against an older version of the module and then updated to the latest in the dev branch.
  • The version of the module it was created against also has some custom modifications in it.
  • I made a few changes while getting the patch ready.
  • I did not modify (add, change, or remove) any of the tests.

I wanted to at least get this out here and started.

oadaeh’s picture

Assigned: oadaeh » Unassigned
ptmkenny’s picture

Status: Needs review » Needs work

Thank you for the patch. Note that to add major new functionality, there definitely need to be automated tests included with the patch.

oadaeh’s picture

@ptmkenny I do understand that there needs to be tests for the patch to be considered. I was simply putting what I have done so far out here for anyone to check out and possibly start using.
I also believe that for this particular bit of functionality, #1184984: Full public CRUD API should be a dependency of this patch, and maybe also #744374: Introduce a pm_thread table. I will be looking at doing updates for both of those as soon as I can scrape out the time to do so.

omidehghanZD’s picture

this feature is ok?
we can use 7.2.x dev version of privatemsg for this ability?

i want add this ability (edit or delete messages before readen by reciever )

thank you for your response beforehand...

oadaeh’s picture

When I posted the patch, it was working fine for me.
That being said, however, I have not touched it since then, and it is entirely possible that I may have missed some use case or scenario in my testing.
Feel free to try it out, but I do not recommend putting it on a production site as it currently is.

ivnish’s picture

Status: Needs work » Closed (outdated)
andypost’s picture

Status: Closed (outdated) » Needs work

D7 is not yet outdated

ivnish’s picture

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.