Merge branch 'feature/jsonld-context-cleanup' into 'develop'

jsonld context cleanup

Closes #369

See merge request pleroma/pleroma!434
This commit is contained in:
kaniini 2018-11-08 17:42:05 +00:00
commit a44d87f059
2 changed files with 2 additions and 13 deletions

View file

@ -70,18 +70,7 @@ def make_json_ld_header do
%{
"@context" => [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
%{
"manuallyApprovesFollowers" => "as:manuallyApprovesFollowers",
"sensitive" => "as:sensitive",
"Hashtag" => "as:Hashtag",
"ostatus" => "http://ostatus.org#",
"atomUri" => "ostatus:atomUri",
"inReplyToAtomUri" => "ostatus:inReplyToAtomUri",
"conversation" => "ostatus:conversation",
"toot" => "http://joinmastodon.org/ns#",
"Emoji" => "toot:Emoji"
}
"https://litepub.github.io/litepub/context.jsonld"
]
}
end

View file

@ -17,7 +17,6 @@ def render("user.json", %{user: %{nickname: nil} = user}) do
public_key = :public_key.pem_encode([public_key])
%{
"@context" => "https://www.w3.org/ns/activitystreams",
"id" => user.ap_id,
"type" => "Application",
"following" => "#{user.ap_id}/following",
@ -36,6 +35,7 @@ def render("user.json", %{user: %{nickname: nil} = user}) do
"sharedInbox" => "#{Pleroma.Web.Endpoint.url()}/inbox"
}
}
|> Map.merge(Utils.make_json_ld_header())
end
def render("user.json", %{user: user}) do