Support for FEP 2677

merge-requests/30/head
Bob Mottram 2023-10-19 14:51:53 +01:00
parent 369cb374d8
commit 97c10c0bb7
2 changed files with 9 additions and 3 deletions

View File

@ -68,7 +68,7 @@ def meta_data_node_info(base_dir: str,
'chat_enabled': False, 'chat_enabled': False,
'postFormats': ['text/plain', 'text/html', 'text/markdown'], 'postFormats': ['text/plain', 'text/html', 'text/markdown'],
'FEPs': ['c648', '521a', '8fcf', '4ccd', 'c118', 'fffd', 'FEPs': ['c648', '521a', '8fcf', '4ccd', 'c118', 'fffd',
'1970', '0837', '7628'] '1970', '0837', '7628', '2677']
}, },
'version': '2.1' 'version': '2.1'
} }

View File

@ -225,12 +225,18 @@ def create_webfinger_endpoint(nickname: str, domain: str, port: int,
def webfinger_node_info(http_prefix: str, domain_full: str) -> {}: def webfinger_node_info(http_prefix: str, domain_full: str) -> {}:
""" /.well-known/nodeinfo endpoint """ /.well-known/nodeinfo endpoint
https://codeberg.org/fediverse/fep/src/branch/main/fep/2677/fep-2677.md
""" """
instance_url = http_prefix + '://' + domain_full
nodeinfo = { nodeinfo = {
'links': [ 'links': [
{ {
'href': http_prefix + '://' + domain_full + '/nodeinfo/2.0', 'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.0',
'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.0' 'href': instance_url + '/nodeinfo/2.0'
},
{
"rel": "https://www.w3.org/ns/activitystreams#Application",
"href": instance_url + '/actor'
} }
] ]
} }