mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Ignore remote Creates to local_only communities
This commit is contained in:
parent
cd0419a93a
commit
8275f75a28
1 changed files with 5 additions and 0 deletions
|
@ -514,6 +514,11 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
return
|
return
|
||||||
community = find_actor_or_create(community_ap_id, community_only=True)
|
community = find_actor_or_create(community_ap_id, community_only=True)
|
||||||
|
if community and community.local_only:
|
||||||
|
activity_log.exception_message = 'Remote Create in local_only community'
|
||||||
|
activity_log.result = 'ignored'
|
||||||
|
db.session.commit()
|
||||||
|
return
|
||||||
user = find_actor_or_create(user_ap_id)
|
user = find_actor_or_create(user_ap_id)
|
||||||
if (user and not user.is_local()) and community:
|
if (user and not user.is_local()) and community:
|
||||||
user.last_seen = community.last_active = site.last_active = utcnow()
|
user.last_seen = community.last_active = site.last_active = utcnow()
|
||||||
|
|
Loading…
Add table
Reference in a new issue