From a05b44f27b0200a5ef4b88d9a5827d2497cc3530 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Thu, 16 Nov 2023 08:52:52 +0000 Subject: [PATCH] feat(api): Add atom1.0 to node info services Part-of: --- api/funkwhale_api/instance/views.py | 1 + api/tests/instance/test_nodeinfo.py | 2 +- changes/changelog.d/atom10.feature | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/atom10.feature diff --git a/api/funkwhale_api/instance/views.py b/api/funkwhale_api/instance/views.py index ffde3db4a..f82e1f888 100644 --- a/api/funkwhale_api/instance/views.py +++ b/api/funkwhale_api/instance/views.py @@ -81,6 +81,7 @@ class NodeInfo(views.APIView): data = { "software": {"version": funkwhale_version}, + "services": {"inbound": ["atom1.0"], "outbound": ["atom1.0"]}, "preferences": pref, "stats": cache_memoize(600, prefix="memoize:instance:stats")(stats.get)() if pref["instance__nodeinfo_stats_enabled"] diff --git a/api/tests/instance/test_nodeinfo.py b/api/tests/instance/test_nodeinfo.py index bd5b2e6cd..a58e5cc80 100644 --- a/api/tests/instance/test_nodeinfo.py +++ b/api/tests/instance/test_nodeinfo.py @@ -14,7 +14,7 @@ def test_nodeinfo_default(api_client): "version": "2.0", "software": OrderedDict([("name", "funkwhale"), ("version", api_version)]), "protocols": ["activitypub"], - "services": OrderedDict([("inbound", []), ("outbound", [])]), + "services": OrderedDict([("inbound", ["atom1.0"]), ("outbound", ["atom1.0"])]), "openRegistrations": False, "usage": { "users": OrderedDict( diff --git a/changes/changelog.d/atom10.feature b/changes/changelog.d/atom10.feature new file mode 100644 index 000000000..2a8376cdc --- /dev/null +++ b/changes/changelog.d/atom10.feature @@ -0,0 +1 @@ +Add atom1.0 to node info services (#2085)