Hi! I'm trying a "little" feature request here, hoping you consider it, I think it could be veeery useful to a lot of users, maybe something you could brag about in the features list ;)

Obvious rationale for a trashcan system: users make mistakes
- user deletes the wrong thread
- user instantly regrets deleting the thread
- user misclicks the "leave chat" link in the thread view (wanted to click on the user next to it, or wanted to scroll or whatever, this one is kinda "violent" since it's a "just one click" unrecoverable action)

There is currently no way for the user to recover from those mistakes.

1 - A "Deleted threads" view

We can already do this with the current module, something like:
"show the threads deleted by the user in the last {30 days}".

Now this view currently is not very useful:
- user can't see the content of the deleted threads
- user can't restore the deleted threads.

2 - A "Restore thread" action

If anything this would be the most useful addition, I guess it would do something like this:
- remove the deleted mark
- reinstate the user to the list of participants

This would be the only action available in the "deleted threads" view (the other ones are irrelevant here, and I have the feeling that a "permanently remove" action would complicate things too much while not being that useful).

3 - Ability to view a deleted thread

This might be the tricky part, not sure how much but it would make the system feel "complete" for the user.
I guess it would involve a kind of "Trashcan time span" setting (30 days in my example).

The idea would be sommething like:
- if a thread has been deleted for more than {30 days} then it's inaccessible, else it's still accessible (from the "deleted threads" view)

If a user is viewing a deleted thread that is still accessible, then the usual interactions should be disabled:
- the "Change tags" form (if permitted) shouldn't be shown.
- the "Leave chat" link shouldn't be shown.
- the "Delete" links on messages (if permitted) shouldn't be shown.
- the "Message" form shouldn't be shown.

Ideally at the top of the page there would be a message in the likes of "you're viewing a deleted thread. {restore action link}"

Voilà, my humble suggestions, to me it seems like an "essential" feature to add to the core features, but hey, that's just me, and I know that would require a bit of your precious time... (I can help with testing)

What do you think?
Cheers

Comments

lemartialou created an issue.

ivnish’s picture

In fact, this functionality is already implemented in the project sponsoring the module's development. :) In principle, I could port it to the contributed version of the module. I didn't do this before because the old contributed version didn't have it. But if there's a user request, the code is already written. Three built-in tags have been added: "favorites", "trash", and "system". Users can add threads to "favorites", "trash" stores deleted threads, and "system" is used for system notifications via private messages.

ivnish’s picture

But the current implementation may conflict with your system if you don't plan to use tags.

lemartialou’s picture

A little more context on my personal case: I'm curently trying to migrate an ooold drupal 6 site with a big community and a lot of content, there are around 600 000 messages and 80 000 threads to migrate from the old privatemsg module, it takes forever but it works, thanks to you I can now reproduce in drupal 11 the same private message system my users already have.

So currently they don't have much: mark_as_read/mark_as_unread/delete, and they can disable the private messages if they want to. That's it.

Now since the site update will be pretty significant I wanted to give them a little more, the mail notification will already be a nice addition, a trashcan system would have been a really great addition...

I don't plan to enable user tags, it's not a feature that's been asked for, and I'd rather have the most simple system possible.

But I'm not against a few sensitive global tags, like the ones you mentioned (favorites/trash/system), in fact this might be the ideal system for my use case...

Favorites: perfect as a user tags replacement, just one tag to mark a thread as important, simple and useful, that would be a nice addition to my users.

Trash: so in your updated system users can delete threads, and then they can still read those threads inside the trash? Can they restore the threads to the main inbox? Can we tweak the trash view so only the deleted threads from the last X days are shown? If so that would be perfect for my use case.

System: seems interesting but I'm not sure what you mean by "system notifications", is this some kind of drupal messaging rerouting, or is this a way for administrators to discuss with the user (for example if the user has been banned with no more right to discuss with other people)? The latter would be nice for my use case.

Well, I guess I am really interested by your sponsored version (even if that means I have to enable user tags), those features would be great additions to the contrib module, making it more appealing to new users I guess, and I hope they would also benefit other current users besides myself too... but hey, for now you've only got this: one user's request... ^^'

ivnish’s picture

can still read those threads inside the trash? Can they restore the threads to the main inbox? Can we tweak the trash view so only the deleted threads from the last X days are shown? If so that would be perfect for my use case.

Yes, you can views threads in trash, you can restore threads from trash.

seems interesting but I'm not sure what you mean by "system notifications",

For example automatic messages like "User want to add you to friend list" etc. Also messages with moderators automatically have tag "system"

even if that means I have to enable user tags

I think you can disable creating new tags by users

lemartialou’s picture

Well... that seems awesome!

(I am assuming here that the drupal 6 migration still works with this sponsored version)

If I understand correctly, your client has been enjoying this special version for some time now, would you be willing to merge those great additions to the contrib module at some point? Like... I don't know... maybe soon? ^^'