feat(nodeinfo): extract and save NodeInfo information from instances to display it on instances list
We also try to detect the application actor if it's not given by NodeInfo metadata (FEP-2677) (guessing for Mobilizon, PeerTube & Mastodon). Closes #1392 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
12
test/fixtures/nodeinfo/both_versions.json
vendored
Normal file
12
test/fixtures/nodeinfo/both_versions.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"links": [
|
||||
{
|
||||
"rel": "http://nodeinfo.diaspora.software/ns/schema/2.0",
|
||||
"href": "https://mobilizon.fr/.well-known/nodeinfo/2.0"
|
||||
},
|
||||
{
|
||||
"rel": "http://nodeinfo.diaspora.software/ns/schema/2.1",
|
||||
"href": "https://mobilizon.fr/.well-known/nodeinfo/2.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
29
test/fixtures/nodeinfo/data.json
vendored
Normal file
29
test/fixtures/nodeinfo/data.json
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"version": "2.1",
|
||||
"protocols": [
|
||||
"activitypub"
|
||||
],
|
||||
"metadata": {
|
||||
"nodeDescription": "Mobilizon.fr est l'instance Mobilizon de Framasoft.",
|
||||
"nodeName": "Mobilizon"
|
||||
},
|
||||
"usage": {
|
||||
"users": {
|
||||
"total": 9204
|
||||
},
|
||||
"localComments": 3253,
|
||||
"localPosts": 7545
|
||||
},
|
||||
"services": {
|
||||
"outbound": [
|
||||
"atom1.0"
|
||||
],
|
||||
"inbound": []
|
||||
},
|
||||
"software": {
|
||||
"name": "Mobilizon",
|
||||
"version": "4.0.2",
|
||||
"repository": "https://framagit.org/framasoft/mobilizon"
|
||||
},
|
||||
"openRegistrations": true
|
||||
}
|
||||
8
test/fixtures/nodeinfo/older_versions.json
vendored
Normal file
8
test/fixtures/nodeinfo/older_versions.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"links": [
|
||||
{
|
||||
"rel": "http://nodeinfo.diaspora.software/ns/schema/1.1",
|
||||
"href": "https://mobilizon.fr/.well-known/nodeinfo/1.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
test/fixtures/nodeinfo/regular.json
vendored
4
test/fixtures/nodeinfo/regular.json
vendored
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"links": [
|
||||
{
|
||||
"rel": "http:\/\/nodeinfo.diaspora.software\/ns\/schema\/2.0",
|
||||
"href": "https:\/\/event-federation.eu\/wp-json\/activitypub\/1.0\/nodeinfo"
|
||||
"rel": "http://nodeinfo.diaspora.software/ns/schema/2.0",
|
||||
"href": "https://event-federation.eu/wp-json/activitypub/1.0/nodeinfo"
|
||||
}
|
||||
]
|
||||
}
|
||||
24
test/fixtures/nodeinfo/wp-data.json
vendored
Normal file
24
test/fixtures/nodeinfo/wp-data.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"version": "2.0",
|
||||
"software": {
|
||||
"name": "wordpress",
|
||||
"version": "6.4.2"
|
||||
},
|
||||
"usage": {
|
||||
"users": {
|
||||
"total": 1,
|
||||
"activeMonth": 1,
|
||||
"activeHalfyear": 1
|
||||
},
|
||||
"localPosts": 3,
|
||||
"localComments": 3
|
||||
},
|
||||
"openRegistrations": false,
|
||||
"protocols": [
|
||||
"activitypub"
|
||||
],
|
||||
"services": {
|
||||
"inbound": [],
|
||||
"outbound": []
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"links": [
|
||||
{
|
||||
"rel": "http:\/\/nodeinfo.diaspora.software\/ns\/schema\/2.0",
|
||||
"href": "https:\/\/event-federation.eu\/wp-json\/activitypub\/1.0\/nodeinfo"
|
||||
"rel": "http://nodeinfo.diaspora.software/ns/schema/2.0",
|
||||
"href": "https://event-federation.eu/wp-json/activitypub/1.0/nodeinfo"
|
||||
},
|
||||
{
|
||||
"rel": "https://www.w3.org/ns/activitystreams#Application",
|
||||
|
||||
Reference in New Issue
Block a user