Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modlog should have entries for bulk-removed items, such as a result of a community/instance ban with content removal #4699

Open
5 tasks done
Nothing4You opened this issue May 4, 2024 · 6 comments
Labels
area: moderation enhancement New feature or request
Milestone

Comments

@Nothing4You
Copy link
Contributor

Requirements

  • Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

Currently there is no way to track why a certain post or comment is removed when the creator has been community or instance banned with content removal.
Filtering by community modlog won't have any logs for an instance wide ban, filtering by post/comment won't have any logs for a community or instance wide ban.

It also makes it very hard to find content removed as part of the ban without manually traversing the API to find content that is marked as removed in their community, by crawling a person's profile.

Describe the solution you'd like.

Every single post or comment removed should be part of the modlog.
It should be possible to look up the reason for removal for every single post/comment, without having to check item modlog and afterwards person modlog.

It would probably be beneficial to have a relation between the bulk action of performing a ban with content removal and the individual post/comment removals triggered from this.

Depending on the implementation details, this could potentially also make it easier to reverse bans with content removal without restoring content that was already removed prior to the ban.

Content that has already been removed prior to the ban should likely not trigger additional removal modlog entries.

The DB part of this implementation should likely wrap the entire thing into a single transaction if possible to improve performance and ensure consistency.

Describe alternatives you've considered.

e.g. #4693

Additional context

Depending on the case, this can have rather significant DB impact if instead of just changing a bunch of comments to removed=true this also inserts a bunch of rows into the database.

See also

@dessalines
Copy link
Member

This isn't too difficult to add, as we already do it for individual removals. I'll try to get on this soon.

@dessalines dessalines added this to the 0.19.5 milestone May 7, 2024
@informapirata
Copy link

This isn't too difficult to add, as we already do it for individual removals. I'll try to get on this soon.

I'll add a small note about a problem I faced three days ago.
I accidentally banned a user from my instance, resulting in all of his content being deleted.
When I realized the error, I lifted the ban but obviously the contents were now deleted.
This is the right thing, because I can decide to give a second chance to the rightly banned user, but this does not mean that I have to restore his posts.
However, in this case, the ban had occurred by mistake and therefore I felt I had to remedy it by restoring all of his messages: 78 messages and 395 comments!

Well, at that moment I realized that I would have to restore each of the 475 removed objects one at a time! 😭
To do this I had to:

  1. open your profile page,
  2. view all published content (20 for each page),
  3. click on the three dots to the right of each content,
  4. select the restore public (for posts) or restore comment (for comments) item,
  5. manually enter the reason for the restore (the field cannot be empty! 🤬)
  6. and finally click RESET!

I'm happy I was able to restore everything but I had to do each of those six operations 473 times...
😭😭😭😭😭😭😭😭😭😭😭😭😭😭

At this point, I wonder: wouldn't it be possible to insert a function to restore the removed contents in bulk? 🙏

@Nothing4You
Copy link
Contributor Author

i got a script to cover that exact usecase :/

it also has some heuristic to determine whether a removed post/comment was the result of a community ban with content removal based on the community ban duration in modlog to not restore more than intended. this is however still best effort guesswork.

@dessalines
Copy link
Member

@informapirata Could you open up an issue for that one? The BanPerson struct already allows you to click remove_data, so an unban with that unclicked, should probably restore that data. Either that or we could add another field.

@informapirata
Copy link

Could you open up an issue for that one?

Ok

Either that or we could add another field.

Unfortunately, user recovery did not restore the removed content.

@informapirata
Copy link

@informapirata Could you open up an issue for that one? The BanPerson struct already allows you to click remove_data, so an unban with that unclicked, should probably restore that data. Either that or we could add another field.

Here: #4721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: moderation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants