From 0b66127d4035756091335d7f850bd05681716ddc Mon Sep 17 00:00:00 2001 From: freamon Date: Wed, 27 Nov 2024 19:09:10 +0000 Subject: [PATCH] Also ignore it if a.gup.pe announces local content back --- app/activitypub/routes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/activitypub/routes.py b/app/activitypub/routes.py index 71584311..49dbc545 100644 --- a/app/activitypub/routes.py +++ b/app/activitypub/routes.py @@ -947,6 +947,9 @@ def process_inbox_request(request_json, store_ap_json): # Announce is new content and votes that happened on a remote server. if request_json['type'] == 'Announce': if isinstance(request_json['object'], str): # Mastodon, PeerTube, A.gup.pe + if request_json['object'].startswith('https://' + current_app.config['SERVER_NAME']): + log_incoming_ap(announce_id, APLOG_DUPLICATE, APLOG_IGNORED, request_json if store_ap_json else None, 'Activity about local content which is already present') + return post = resolve_remote_post(request_json['object'], community.id, announce_actor=community.ap_profile_id, store_ap_json=store_ap_json) if post: log_incoming_ap(announce_id, APLOG_ANNOUNCE, APLOG_SUCCESS, request_json)