[COMPONENTS][Conversation] reply_add route nows shows the given Note entire conversation, the Note itself is highlighted in the conversation

This commit is contained in:
2021-12-30 18:34:07 +00:00
parent 34cc010136
commit 6dd31926ad
5 changed files with 18 additions and 17 deletions

View File

@@ -32,8 +32,10 @@ use App\Util\Exception\ClientException;
use App\Util\Exception\NoLoggedInUser;
use App\Util\Exception\NoSuchNoteException;
use App\Util\Exception\ServerException;
use Component\Feed\Feed;
use Component\Feed\Util\FeedController;
use Symfony\Component\HttpFoundation\Request;
use function App\Core\I18n\_m;
class Reply extends FeedController
{
@@ -56,9 +58,14 @@ class Reply extends FeedController
throw new NoSuchNoteException();
}
$conversation_id = $note->getConversationId();
$data = Feed::query(query: "note-conversation:{$conversation_id}", page: $this->int('p') ?? 1);
$notes = $data['notes'];
return [
'_template' => 'reply/add_reply.html.twig',
'note' => $note,
'_template' => 'feed/feed.html.twig',
'notes' => $notes,
'should_format' => false,
'page_title' => _m('Conversation'),
];
}
}