use correct link "type" for webfinger response

This commit is contained in:
jesopo 2019-09-11 12:49:10 +01:00
parent cf9c82b131
commit 9988a49518

View file

@ -3,8 +3,10 @@
import binascii, os, urllib.parse import binascii, os, urllib.parse
from src import ModuleManager, utils from src import ModuleManager, utils
ACTIVITY_TYPE = ("application/ld+json; " ACTIVITY_TYPE = ("application/ld+json; "
"profile=\"https://www.w3.org/ns/activitystreams\"") "profile=\"https://www.w3.org/ns/activitystreams\"")
WEBFINGER_LINK = "application/activity+json"
WEBFINGER_TYPE = "application/jrd+json" WEBFINGER_TYPE = "application/jrd+json"
ACTIVITY_SETTING_PREFIX = "ap-activity-" ACTIVITY_SETTING_PREFIX = "ap-activity-"
@ -87,7 +89,7 @@ class Module(ModuleManager.BaseModule):
"links": [{ "links": [{
"href": self_id, "href": self_id,
"rel": "self", "rel": "self",
"type": ACTIVITY_TYPE "type": WEBFINGER_LINK
}], }],
"subject": "acct:%s" % resource "subject": "acct:%s" % resource
}) })