mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-13 17:55:47 +00:00
38 lines
895 B
PHP
38 lines
895 B
PHP
![]() |
<?php
|
||
|
|
||
|
/**
|
||
|
* 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;
|
||
|
|
||
|
class AnnounceActivity extends Activity
|
||
|
{
|
||
|
/**
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $type = 'Announce';
|
||
|
|
||
|
public function __construct($reblogNote)
|
||
|
{
|
||
|
$this->actor = $reblogNote->actor->uri;
|
||
|
$this->object = $reblogNote->reblog_of_note->uri;
|
||
|
|
||
|
$this->published = $reblogNote->published_at->format(DATE_W3C);
|
||
|
|
||
|
$this->cc = [
|
||
|
$reblogNote->actor->uri,
|
||
|
$reblogNote->actor->followers_url,
|
||
|
];
|
||
|
}
|
||
|
}
|