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

Add modlog entries for bulk removals. #5050

Merged
merged 12 commits into from
Oct 1, 2024
2 changes: 2 additions & 0 deletions crates/api/src/community/ban.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ pub async fn ban_from_community(
let remove_data = data.ban;
remove_or_restore_user_data_in_community(
data.community_id,
local_user_view.person.id,
banned_person_id,
remove_data,
&data.reason,
&mut context.pool(),
)
.await?;
Expand Down
4 changes: 2 additions & 2 deletions crates/api/src/local_user/ban_person.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ pub async fn ban_from_site(
// Remove their data if that's desired
if data.remove_or_restore_data.unwrap_or(false) {
if data.ban {
remove_user_data(person.id, &context).await?;
remove_user_data(local_user_view.person.id, person.id, &data.reason, &context).await?;
} else {
restore_user_data(person.id, &context).await?;
restore_user_data(local_user_view.person.id, person.id, &data.reason, &context).await?;
}
};

Expand Down
Loading