[COMPONENTS][Conversation] Conversation entity moved to respective component, URI column added

Route for conversation added and Conversation Controller created.

[CONTROLLER][Conversation] Created ConversationShow function, will be used to render the conversation route page

[ENTITY][Note] Conversation id column added, this way a Note can have a direct relation with its respective conversation.
This commit is contained in:
2021-12-10 18:23:03 +00:00
committed by Diogo Peralta Cordeiro
parent c494928b46
commit c83ae76a68
5 changed files with 174 additions and 55 deletions

View File

@@ -26,6 +26,7 @@ declare(strict_types = 1);
namespace Component\Conversation\Controller;
use _PHPStan_76800bfb5\Nette\NotImplementedException;
use App\Core\Controller\FeedController;
use App\Core\DB\DB;
use App\Core\Form;
@@ -55,6 +56,7 @@ class Conversation extends FeedController
// if note is a reply -> link from above plus anchor
public function ConversationShow(Request $request)
{
throw new NotImplementedException();
$actor_id = Common::ensureLoggedIn()->getId();
$notes = DB::dql('select n from App\Entity\Note n '
. 'where n.reply_to is not null and n.actor_id = :id '