webfinger: expose the application/ld+json link alongside the older application/activity+json link

This commit is contained in:
William Pitcock 2018-05-19 05:43:13 +00:00
parent 1d4bbec6b3
commit cce5a9cb1c
1 changed files with 2 additions and 0 deletions

View File

@ -86,6 +86,7 @@ def represent_user(user, "JSON") do
"href" => "data:application/magic-public-key,#{magic_key}"
},
%{"rel" => "self", "type" => "application/activity+json", "href" => user.ap_id},
%{"rel" => "self", "type" => "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"", "href" => user.ap_id},
%{
"rel" => "http://ostatus.org/schema/1.0/subscribe",
"template" => OStatus.remote_follow_path()
@ -117,6 +118,7 @@ def represent_user(user, "XML") do
{:Link,
%{rel: "magic-public-key", href: "data:application/magic-public-key,#{magic_key}"}},
{:Link, %{rel: "self", type: "application/activity+json", href: user.ap_id}},
{:Link, %{rel: "self", type: "application/ld+json; profile="https://www.w3.org/ns/activitystreams"", href: user.ap_id}},
{:Link,
%{rel: "http://ostatus.org/schema/1.0/subscribe", template: OStatus.remote_follow_path()}}
]