mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-30 08:53:17 +00:00
19 lines
415 B
PHP
19 lines
415 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Transformer\ActivityPub\Verb;
|
||
|
|
||
|
use App\Follower;
|
||
|
use League\Fractal;
|
||
|
|
||
|
class Follow extends Fractal\TransformerAbstract
|
||
|
{
|
||
|
public function transform(Follower $follower)
|
||
|
{
|
||
|
return [
|
||
|
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||
|
'type' => 'Follow',
|
||
|
'actor' => $follower->actor->permalink(),
|
||
|
'object' => $follower->target->permalink()
|
||
|
];
|
||
|
}
|
||
|
}
|