1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-30 19:55:10 +00:00
pixelfed/app/Transformer/ActivityPub/Verb/Follow.php

19 lines
406 B
PHP
Raw Normal View History

2018-11-13 05:29:27 +00:00
<?php
namespace App\Transformer\ActivityPub\Verb;
use App\Follower;
use League\Fractal;
class Follow extends Fractal\TransformerAbstract
{
2019-01-01 06:26:42 +00:00
public function transform($follower)
2018-11-13 05:29:27 +00:00
{
return [
'@context' => 'https://www.w3.org/ns/activitystreams',
'type' => 'Follow',
'actor' => $follower->actor->permalink(),
'object' => $follower->target->permalink()
];
}
}