Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
a44d87f0
Commit
a44d87f0
authored
Nov 08, 2018
by
kaniini
Browse files
Merge branch 'feature/jsonld-context-cleanup' into 'develop'
jsonld context cleanup Closes
#369
See merge request
!434
parents
59cf7cf2
da16ada4
Pipeline
#4329
passed with stages
in 6 minutes and 32 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
lib/pleroma/web/activity_pub/utils.ex
View file @
a44d87f0
...
...
@@ -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
...
...
lib/pleroma/web/activity_pub/views/user_view.ex
View file @
a44d87f0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment