mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-05 17:02:01 +00:00

- remove confusing counts for episode (total favourites, total reblogs) - add comments section to episode page to display episode comments + post replies linked to the episode
33 lines
888 B
PHP
33 lines
888 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Activity objects are specializations of the base Object type that provide information about actions that have either
|
|
* already occurred, are in the process of occurring, or may occur in the future.
|
|
*
|
|
* @copyright 2021 Podlibre
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
namespace ActivityPub\Activities;
|
|
|
|
use ActivityPub\Core\Activity;
|
|
use ActivityPub\Entities\Post;
|
|
|
|
class AnnounceActivity extends Activity
|
|
{
|
|
protected string $type = 'Announce';
|
|
|
|
public function __construct(Post $reblogPost)
|
|
{
|
|
$this->actor = $reblogPost->actor->uri;
|
|
$this->object = $reblogPost->reblog_of_post->uri;
|
|
|
|
$this->published = $reblogPost->published_at->format(DATE_W3C);
|
|
|
|
$this->cc = [$reblogPost->actor->uri, $reblogPost->actor->followers_url];
|
|
}
|
|
}
|