2021-04-02 17:20:02 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
/**
|
2022-02-19 16:06:11 +00:00
|
|
|
* @copyright 2021 Ad Aures
|
2021-04-02 17:20:02 +00:00
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Libraries;
|
|
|
|
|
2021-08-13 11:07:29 +00:00
|
|
|
use App\Entities\Post;
|
2021-08-27 10:58:22 +00:00
|
|
|
use Modules\Fediverse\Objects\NoteObject as FediverseNoteObject;
|
2021-05-12 14:00:25 +00:00
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
class NoteObject extends FediverseNoteObject
|
2021-04-02 17:20:02 +00:00
|
|
|
{
|
2021-06-08 09:52:11 +00:00
|
|
|
/**
|
2021-08-13 11:07:29 +00:00
|
|
|
* @param Post $post
|
2021-06-08 09:52:11 +00:00
|
|
|
*/
|
2021-08-23 11:05:16 +00:00
|
|
|
public function __construct($post)
|
2021-04-02 17:20:02 +00:00
|
|
|
{
|
2021-08-13 11:07:29 +00:00
|
|
|
parent::__construct($post);
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2021-08-13 11:07:29 +00:00
|
|
|
if ($post->episode_id) {
|
2021-04-02 17:20:02 +00:00
|
|
|
$this->content =
|
2022-01-23 15:42:56 +00:00
|
|
|
'<a href="' . $post->episode->link . '">' . $post->episode->title . '</a><br/>' . $post->message_html;
|
2021-04-02 17:20:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|