Skip to content

Implements the nodeinfo endpoints

dashie requested to merge dashie/pleroma:feature/nodeinfo into develop

This implements the nodeinfo (https://github.com/jhass/nodeinfo/) endpoints.

The first /.well-known/nodeinfo will returns the supported schema:

{
    "links": [
        {
            "href": "http://0.0.0.0:4000/nodeinfo/2.0.json",
            "rel": "http://nodeinfo.diaspora.software/ns/schema/2.0"
        }
    ]
}

And the nodeinfo itself /nodeinfo/2.0.json:

{
    "metadata": {
        "nodeName": "such instance, very dev"
    },
    "openRegistrations": true,
    "protocols": [
        "ostatus",
        "activitypub"
    ],
    "services": {
        "inbound": [],
        "outbound": []
    },
    "software": {
        "name": "pleroma",
        "version": "Pleroma 0.9.0 724f096ac76f9f4c124721e3f0c2675655d7a8d0"
    },
    "usage": {
        "localPosts": 0,
        "users": {
            "total": 1
        }
    },
    "version": "2.0"
}

The minimum required from the schema is present, metadata.nodeName (free-form) seems to be the most used thing so I added it too.

Merge request reports

Loading