mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Bugfix: also federate post deletion by post owners #341
This commit is contained in:
parent
af3bc4f0dd
commit
0274682adc
1 changed files with 1 additions and 1 deletions
|
@ -1054,7 +1054,7 @@ def post_delete_post(community: Community, post: Post, user_id: int, federate_al
|
||||||
# Federation
|
# Federation
|
||||||
if not community.local_only: # local_only communities do not federate
|
if not community.local_only: # local_only communities do not federate
|
||||||
# if this is a remote community and we are a mod of that community
|
# if this is a remote community and we are a mod of that community
|
||||||
if not post.community.is_local() and user.is_local() and (community.is_moderator(user) or community.is_owner(user)):
|
if not post.community.is_local() and user.is_local() and (post.user_id == user.id or community.is_moderator(user) or community.is_owner(user)):
|
||||||
post_request(post.community.ap_inbox_url, delete_json, user.private_key, user.public_url() + '#main-key')
|
post_request(post.community.ap_inbox_url, delete_json, user.private_key, user.public_url() + '#main-key')
|
||||||
elif post.community.is_local(): # if this is a local community - Announce it to followers on remote instances
|
elif post.community.is_local(): # if this is a local community - Announce it to followers on remote instances
|
||||||
announce = {
|
announce = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue