castopod/app/Libraries/NoteObject.php
Yassine Doghri bb4752c35e feat(comments): add comments to episodes + update naming of status to post
- 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
2021-12-29 11:54:22 +00:00

36 lines
806 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 ActivityPub\Objects\NoteObject as ActivityPubNoteObject;
use App\Entities\Post;
class NoteObject extends ActivityPubNoteObject
{
/**
* @param Post $post
*/
public function __construct(\ActivityPub\Entities\Post $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;
}
}
}