Tweak the NodeInfo output

This commit is contained in:
Thomas Sileo 2019-07-29 22:53:41 +02:00
parent b00263c817
commit a6bd6ee7b3
2 changed files with 5 additions and 4 deletions

7
app.py
View file

@ -1121,10 +1121,11 @@ def nodeinfo():
response = json.dumps( response = json.dumps(
{ {
"version": "2.0", "version": "2.1",
"software": { "software": {
"name": "microblogpub", "name": "microblogpub",
"version": f"Microblog.pub {VERSION} ({VERSION_DATE})", "version": f"{VERSION}",
"repository": "https://github.com/tsileo/microblog.pub",
}, },
"protocols": ["activitypub"], "protocols": ["activitypub"],
"services": {"inbound": [], "outbound": []}, "services": {"inbound": [], "outbound": []},
@ -1143,7 +1144,7 @@ def nodeinfo():
_cache(response, "api") _cache(response, "api")
return Response( return Response(
headers={ headers={
"Content-Type": "application/json; profile=http://nodeinfo.diaspora.software/ns/schema/2.0#" "Content-Type": "application/json; profile=http://nodeinfo.diaspora.software/ns/schema/2.1#"
}, },
response=response, response=response,
) )

View file

@ -1,5 +1,5 @@
from enum import unique
from enum import Enum from enum import Enum
from enum import unique
from typing import Any from typing import Any
from typing import Dict from typing import Dict