forked from mirror/pixelfed
Fix json-ld attributes, fixes #3423
This commit is contained in:
parent
8f9d36bd3d
commit
95f902b12b
5 changed files with 20 additions and 23 deletions
|
@ -60,10 +60,10 @@ class CreateNote extends Fractal\TransformerAbstract
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'commentsEnabled' => 'sc:Boolean',
|
||||||
'capabilities' => [
|
'@capabilities' => [
|
||||||
'announce' => ['@type' => '@id'],
|
'@announce' => '@id',
|
||||||
'like' => ['@type' => '@id'],
|
'@like' => '@id',
|
||||||
'reply' => ['@type' => '@id']
|
'@reply' => '@id',
|
||||||
],
|
],
|
||||||
'toot' => 'http://joinmastodon.org/ns#',
|
'toot' => 'http://joinmastodon.org/ns#',
|
||||||
'Emoji' => 'toot:Emoji'
|
'Emoji' => 'toot:Emoji'
|
||||||
|
|
|
@ -23,11 +23,11 @@ class CreateQuestion extends Fractal\TransformerAbstract
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'commentsEnabled' => 'sc:Boolean',
|
||||||
'capabilities' => [
|
'@capabilities' => [
|
||||||
'announce' => ['@type' => '@id'],
|
'@announce' => '@id',
|
||||||
'like' => ['@type' => '@id'],
|
'@like' => '@id',
|
||||||
'reply' => ['@type' => '@id']
|
'@reply' => '@id',
|
||||||
]
|
],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'id' => $status->permalink(),
|
'id' => $status->permalink(),
|
||||||
|
|
|
@ -10,10 +10,7 @@ class DeleteNote extends Fractal\TransformerAbstract
|
||||||
public function transform(Status $status)
|
public function transform(Status $status)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'@context' => [
|
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||||
'https://www.w3.org/ns/activitystreams',
|
|
||||||
'https://w3id.org/security/v1',
|
|
||||||
],
|
|
||||||
'id' => $status->permalink('#delete'),
|
'id' => $status->permalink('#delete'),
|
||||||
'type' => 'Delete',
|
'type' => 'Delete',
|
||||||
'actor' => $status->profile->permalink(),
|
'actor' => $status->profile->permalink(),
|
||||||
|
@ -24,4 +21,4 @@ class DeleteNote extends Fractal\TransformerAbstract
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,10 +61,10 @@ class Note extends Fractal\TransformerAbstract
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'commentsEnabled' => 'sc:Boolean',
|
||||||
'capabilities' => [
|
'@capabilities' => [
|
||||||
'announce' => ['@type' => '@id'],
|
'@announce' => '@id',
|
||||||
'like' => ['@type' => '@id'],
|
'@like' => '@id',
|
||||||
'reply' => ['@type' => '@id'],
|
'@reply' => '@id',
|
||||||
],
|
],
|
||||||
'toot' => 'http://joinmastodon.org/ns#',
|
'toot' => 'http://joinmastodon.org/ns#',
|
||||||
'Emoji' => 'toot:Emoji'
|
'Emoji' => 'toot:Emoji'
|
||||||
|
|
|
@ -40,11 +40,11 @@ class Question extends Fractal\TransformerAbstract
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'commentsEnabled' => 'sc:Boolean',
|
||||||
'capabilities' => [
|
'@capabilities' => [
|
||||||
'announce' => ['@type' => '@id'],
|
'@announce' => '@id',
|
||||||
'like' => ['@type' => '@id'],
|
'@like' => '@id',
|
||||||
'reply' => ['@type' => '@id']
|
'@reply' => '@id',
|
||||||
]
|
],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'id' => $status->url(),
|
'id' => $status->url(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue