castopod/app/Libraries/ActivityPub/Activities/AnnounceActivity.php
Yassine Doghri aa1612342e
style(ecs): add easy-coding-standard to enforce coding style rules for php
- update .devcontainer settings: remove auto-formatting
for php + set intelephense as default formatter
- remove prettier php plugin as it lacks php 8 support
- add captain hook action for checking style pre-commit
- fix style with ecs on all files except views
2021-06-11 09:34:48 +00:00

31 lines
862 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;
use ActivityPub\Entities\Note;
class AnnounceActivity extends Activity
{
protected string $type = 'Announce';
public function __construct(Note $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];
}
}