mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Community Bans can also come from site admins
This commit is contained in:
parent
be41133dd9
commit
f06a299f56
1 changed files with 2 additions and 2 deletions
|
@ -1461,8 +1461,8 @@ def remove_data_from_banned_user_task(deletor_ap_id, user_ap_id, target):
|
||||||
post_replies = PostReply.query.filter_by(user_id=user.id)
|
post_replies = PostReply.query.filter_by(user_id=user.id)
|
||||||
posts = Post.query.filter_by(user_id=user.id)
|
posts = Post.query.filter_by(user_id=user.id)
|
||||||
|
|
||||||
# community bans by mods
|
# community bans by mods or admins
|
||||||
elif community and community.is_moderator(deletor):
|
elif community and (community.is_moderator(deletor) or community.is_instance_admin(deletor)):
|
||||||
post_replies = PostReply.query.filter_by(user_id=user.id, community_id=community.id, deleted=False)
|
post_replies = PostReply.query.filter_by(user_id=user.id, community_id=community.id, deleted=False)
|
||||||
posts = Post.query.filter_by(user_id=user.id, community_id=community.id, deleted=False)
|
posts = Post.query.filter_by(user_id=user.id, community_id=community.id, deleted=False)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue