1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2025-03-06 19:48:22 +00:00
pixelfed/app/Transformer/ActivityPub/Verb/Like.php

20 lines
434 B
PHP
Raw Normal View History

2018-11-12 22:26:19 -07:00
<?php
namespace App\Transformer\ActivityPub\Verb;
use App\Like as LikeModel;
use League\Fractal;
class Like extends Fractal\TransformerAbstract
{
2018-12-21 12:56:56 -07:00
public function transform(LikeModel $like)
{
return [
'@context' => 'https://www.w3.org/ns/activitystreams',
2019-06-24 14:26:16 -06:00
'id' => $like->actor->permalink('#likes/'.$like->id),
2018-12-21 12:56:56 -07:00
'type' => 'Like',
'actor' => $like->actor->permalink(),
'object' => $like->status->url()
];
}
2018-11-12 22:26:19 -07:00
}