From 95121b9919fe193174d82805910c523e5cc01417 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 23 Jun 2024 10:11:17 +0100 Subject: [PATCH] opt-out preference signals --- metadata.py | 2 +- posts.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/metadata.py b/metadata.py index 41a16deaa..5c3b1e296 100644 --- a/metadata.py +++ b/metadata.py @@ -95,7 +95,7 @@ def meta_data_node_info(base_dir: str, "publicTimelineVisibility": {}, "postFormats": ["text/plain", "text/html", "text/markdown"], "FEPs": ["c648", "521a", "8fcf", "4ccd", "c118", "fffd", - "1970", "0837", "7628", "2677"] + "1970", "0837", "7628", "2677", "5e53"] } } return nodeinfo diff --git a/posts.py b/posts.py index 815d257cb..f028cdbbc 100644 --- a/posts.py +++ b/posts.py @@ -1268,8 +1268,12 @@ def _create_post_s2s(base_dir: str, nickname: str, domain: str, port: int, local_actor_url(http_prefix, nickname, domain) if not conversation_id: conversation_id = new_post_id + # add opt-outs as in: + # https://codeberg.org/fediverse/fep/src/branch/main/fep/5e53/fep-5e53.md new_post = { '@context': post_context, + 'xRobotsTag': 'noai, noimageai, GPC', + 'secGPC': '1', 'id': new_post_id + '/activity', 'type': 'Create', 'actor': actor_url, @@ -1369,8 +1373,12 @@ def _create_post_c2s(base_dir: str, nickname: str, domain: str, port: int, http_prefix + '://' + domain + '/@' + nickname + '/' + status_number if not conversation_id: conversation_id = new_post_id + # add opt-outs as in: + # https://codeberg.org/fediverse/fep/src/branch/main/fep/5e53/fep-5e53.md new_post = { "@context": post_context, + 'xRobotsTag': 'noai, noimageai, GPC', + 'secGPC': '1', 'id': new_post_id, 'conversation': conversation_id, 'context': conversation_id,