mirror of https://github.com/pixelfed/pixelfed
Update FollowRequest model
parent
4f99039c15
commit
85fb46668c
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformer\ActivityPub\Verb;
|
||||
|
||||
use App\FollowRequest;
|
||||
use League\Fractal;
|
||||
|
||||
class AcceptFollow extends Fractal\TransformerAbstract
|
||||
{
|
||||
public function transform(FollowRequest $follow)
|
||||
{
|
||||
return [
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'type' => 'Accept',
|
||||
'id' => $follow->permalink(),
|
||||
'actor' => $follow->target->permalink(),
|
||||
'object' => [
|
||||
'type' => 'Follow',
|
||||
'id' => $follow->activity ? $follow->activity['id'] : null,
|
||||
'actor' => $follow->actor->permalink(),
|
||||
'object' => $follow->target->permalink()
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue