Problem/Motivation
As site admin I want to be able to delete conversations made by users.
Current status ist, that conversations get deleted if all of the thread members deleted the thread, so that table pm_thread_delete_time contains appropriate information. But there might be a status where it has to be necessary, that the thread must be remove for all thread members.
Steps to reproduce
Create view to manage private message conversations an add link to delete conversation.
As admin use this link to delete thread, but still all members have access to the thread.
Proposed resolution
Thread should be deleted or at least unaccessible to members.
Issue fork private_message-3179135
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
drupalfan2 commentedIs there any solution to delete conversation as admin in the meantime?
Comment #5
id.conky commentedHi, I little bit rewritten delete thread stuff.
Added ability to delete thread completely by adding corresponding buttons to confirm form. Separated leave / delete thread methods in entity. Introduced new permission to have ability to delete thread completely.
So steps to delete conversation:
So basically "Delete thread" removing thread entity and all it's messages completely.
Comment #6
drupalfan2 commentedWhen will this code be available in an official release?
Comment #7
id.conky commentedRe-thinked way of how this should work and done that:
1. Created separate forms, so one for complete deletion of thread, second to clear personal chat history.
2. Tuned access control handler class, so to delete thread, you should be admin or be a member of this thread and have permission "delete private message thread for all". To clear personal chat history you just need to be a member of the thread.
3. Added clear history link to thread view.
Comment #10
artem_sylchukThis is a pretty major API update that may break a lot of installation, so changed target to 3.x.