pixelfed/app/Transformer/ActivityPub/Verb/Announce.php

19 lines
407 B
PHP
Raw Normal View History

2018-11-13 06:15:08 +00:00
<?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()
];
}
}