mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 16:53:17 +00:00
Add AP Announce Transformer
This commit is contained in:
parent
e2e5918213
commit
23f4a1cfec
1 changed files with 19 additions and 0 deletions
19
app/Transformer/ActivityPub/Verb/Announce.php
Normal file
19
app/Transformer/ActivityPub/Verb/Announce.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Transformer\ActivityPub\Verb;
|
||||
|
||||
use App\Status;
|
||||
use League\Fractal;
|
||||
|
||||
class Announce extends Fractal\TransformerAbstract
|
||||
{
|
||||
public function transform(Status $status)
|
||||
{
|
||||
return [
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'type' => 'Announce',
|
||||
'actor' => $status->profile->permalink(),
|
||||
'object' => $status->parent()->url()
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue