mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-13 17:55:47 +00:00

- update Component class structure and remove component helper function and ComponentLoader - update residual activitypub naming to fediverse
36 lines
781 B
PHP
36 lines
781 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* @copyright 2021 Podlibre
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
namespace App\Libraries;
|
|
|
|
use App\Entities\Post;
|
|
use Modules\Fediverse\Objects\NoteObject as FediverseNoteObject;
|
|
|
|
class NoteObject extends FediverseNoteObject
|
|
{
|
|
/**
|
|
* @param Post $post
|
|
*/
|
|
public function __construct($post)
|
|
{
|
|
parent::__construct($post);
|
|
|
|
if ($post->episode_id) {
|
|
$this->content =
|
|
'<a href="' .
|
|
$post->episode->link .
|
|
'" target="_blank" rel="noopener noreferrer">' .
|
|
$post->episode->title .
|
|
'</a><br/>' .
|
|
$post->message_html;
|
|
}
|
|
}
|
|
}
|