mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 08:13:16 +00:00
Update AP Note transformers, thanks kaniini
This commit is contained in:
parent
a724f53775
commit
8f28cb3fb4
2 changed files with 20 additions and 0 deletions
|
@ -35,6 +35,11 @@ class CreateNote extends Fractal\TransformerAbstract
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'commentsEnabled' => 'sc:Boolean',
|
||||||
|
'capabilities' => [
|
||||||
|
'announce' => ['@type' => '@id'],
|
||||||
|
'like' => ['@type' => '@id'],
|
||||||
|
'reply' => ['@type' => '@id']
|
||||||
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'id' => $status->permalink(),
|
'id' => $status->permalink(),
|
||||||
|
@ -65,6 +70,11 @@ class CreateNote extends Fractal\TransformerAbstract
|
||||||
})->toArray(),
|
})->toArray(),
|
||||||
'tag' => $tags,
|
'tag' => $tags,
|
||||||
'commentsEnabled' => (bool) !$status->comments_disabled,
|
'commentsEnabled' => (bool) !$status->comments_disabled,
|
||||||
|
'capabilities' => [
|
||||||
|
'announce' => 'https://www.w3.org/ns/activitystreams#Public',
|
||||||
|
'like' => 'https://www.w3.org/ns/activitystreams#Public',
|
||||||
|
'reply' => $status->comments_disabled == true ? null : 'https://www.w3.org/ns/activitystreams#Public'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,11 @@ class Note extends Fractal\TransformerAbstract
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'commentsEnabled' => 'sc:Boolean',
|
||||||
|
'capabilities' => [
|
||||||
|
'announce' => ['@type' => '@id'],
|
||||||
|
'like' => ['@type' => '@id'],
|
||||||
|
'reply' => ['@type' => '@id'],
|
||||||
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'id' => $status->url(),
|
'id' => $status->url(),
|
||||||
|
@ -58,6 +63,11 @@ class Note extends Fractal\TransformerAbstract
|
||||||
})->toArray(),
|
})->toArray(),
|
||||||
'tag' => $tags,
|
'tag' => $tags,
|
||||||
'commentsEnabled' => (bool) !$status->comments_disabled,
|
'commentsEnabled' => (bool) !$status->comments_disabled,
|
||||||
|
'capabilities' => [
|
||||||
|
'announce' => 'https://www.w3.org/ns/activitystreams#Public',
|
||||||
|
'like' => 'https://www.w3.org/ns/activitystreams#Public',
|
||||||
|
'reply' => $status->comments_disabled == true ? null : 'https://www.w3.org/ns/activitystreams#Public'
|
||||||
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue