Fixes a webfinger issue, and adds html profile in webfinger query

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-11-07 16:45:11 +01:00
parent 23aac914df
commit 5361371d8a
2 changed files with 7 additions and 2 deletions

View File

@ -10,7 +10,7 @@ defmodule MobilizonWeb.Router do
end end
pipeline :well_known do pipeline :well_known do
plug(:accepts, ["json/application", "jrd-json", "application/json"]) plug(:accepts, ["json", "jrd-json"])
end end
pipeline :activity_pub do pipeline :activity_pub do

View File

@ -52,7 +52,12 @@ defmodule Mobilizon.Service.WebFinger do
"subject" => "acct:#{user.preferred_username}@#{MobilizonWeb.Endpoint.host()}", "subject" => "acct:#{user.preferred_username}@#{MobilizonWeb.Endpoint.host()}",
"aliases" => [user.url], "aliases" => [user.url],
"links" => [ "links" => [
%{"rel" => "self", "type" => "application/activity+json", "href" => user.url} %{"rel" => "self", "type" => "application/activity+json", "href" => user.url},
%{
"rel" => "https://webfinger.net/rel/profile-page/",
"type" => "text/html",
"href" => user.url
}
] ]
} }
end end