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
This commit is contained in:
Yassine Doghri 2021-08-13 11:07:29 +00:00
commit bb4752c35e
86 changed files with 1667 additions and 1152 deletions

View file

@ -11,25 +11,25 @@ declare(strict_types=1);
namespace App\Libraries;
use ActivityPub\Objects\NoteObject as ActivityPubNoteObject;
use App\Entities\Status;
use App\Entities\Post;
class NoteObject extends ActivityPubNoteObject
{
/**
* @param Status $status
* @param Post $post
*/
public function __construct(\ActivityPub\Entities\Status $status)
public function __construct(\ActivityPub\Entities\Post $post)
{
parent::__construct($status);
parent::__construct($post);
if ($status->episode_id) {
if ($post->episode_id) {
$this->content =
'<a href="' .
$status->episode->link .
$post->episode->link .
'" target="_blank" rel="noopener noreferrer">' .
$status->episode->title .
$post->episode->title .
'</a><br/>' .
$status->message_html;
$post->message_html;
}
}
}