LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.27k stars 885 forks source link

Add modlog entries for bulk removals. #5050

Closed dessalines closed 1 month ago

dessalines commented 1 month ago
Nutomic commented 1 month ago

With this PR, banning a user with remove content that has some dozens of posts and comments will absolutely flood the mod log of all federated instances. A better solution would be to change ModBanView and ModBanFromCommunityView so that it also includes a list of removed posts/comments by that user (limited to the last 10 items to avoid huge api responses).

dessalines commented 1 month ago

I don't think there's any way to avoid many modlog entries. A mod remove post is a different type and mod action, and is a filterable field.

The main reason people want this, is so they can see all the posts and comments that got removed when an account was banned. There wouldn't be a good way to filter and see all those unless they have their own proper entries.

Nutomic commented 1 month ago

It would be possible to filter for posts which were removed as part of user ban with a separate query, and then merge the results. Shouldnt be too complicated really.

dessalines commented 1 month ago

I'd rather not add hierarchies of moderated items rn. Its okay if the modlog has lots of entries anyway, as those are all currently filterable by the type of action.

Nutomic commented 1 month ago

Alright lets do it this way. At some point we should think about removing old modlog entries to reduce the db size.