From 035fb45272616628527e508ede20760f3a536ea3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 16 May 2024 11:05:14 +0100 Subject: [PATCH] Extra nodeinfo 2.1 metadata --- daemon_get_nodeinfo.py | 3 ++- metadata.py | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/daemon_get_nodeinfo.py b/daemon_get_nodeinfo.py index c254d16d6..13abe3850 100644 --- a/daemon_get_nodeinfo.py +++ b/daemon_get_nodeinfo.py @@ -123,7 +123,8 @@ def get_nodeinfo(self, ua_str: str, calling_domain: str, about_url, terms_of_service_url, registration, node_info_version, - show_node_info_accounts) + show_node_info_accounts, + domain) if info: msg_str = json.dumps(info) msg_str = convert_domains(calling_domain, referer_domain, diff --git a/metadata.py b/metadata.py index e46b6f248..62d575c76 100644 --- a/metadata.py +++ b/metadata.py @@ -17,7 +17,8 @@ def meta_data_node_info(base_dir: str, about_url: str, terms_of_service_url: str, registration: bool, version: str, - show_accounts: bool) -> {}: + show_accounts: bool, + domain: str) -> {}: """ /nodeinfo/2.1 endpoint Also see https://socialhub.activitypub.rocks/t/ https://github.com/jhass/nodeinfo/blob/main/schemas/2.1/example.json @@ -65,7 +66,25 @@ def meta_data_node_info(base_dir: str, } }, 'metadata': { + 'accountActivationRequired': False, + 'features': [ + 'editing', + 'exposable_reactions' + ], 'chat_enabled': False, + 'federatedTimelineAvailable': False, + 'federation': { + 'enabled': True + }, + 'suggestions': { + 'enabled': False + }, + 'invitesEnabled': False, + 'private': True, + 'privilegedStaff': True, + 'nodeName': domain, + 'mailerEnabled': False, + 'publicTimelineVisibility': {}, 'postFormats': ['text/plain', 'text/html', 'text/markdown'], 'FEPs': ['c648', '521a', '8fcf', '4ccd', 'c118', 'fffd', '1970', '0837', '7628', '2677']