[COMPONENT][Conversation] Sort conversation correctly

This commit is contained in:
Hugo Sales 2022-02-27 21:14:33 +00:00
parent 35f3781a32
commit 46c4bd9099
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -63,7 +63,10 @@ class Conversation extends FeedController
return [
'_template' => 'collection/notes.html.twig',
'notes' => $this->query(query: "note-conversation:{$conversation_id}")['notes'] ?? [],
'notes' => $this->query(
query: "note-conversation:{$conversation_id}",
note_order_by: ['note.created' => 'ASC', 'note.id' => 'ASC'],
)['notes'] ?? [],
'should_format' => false,
'page_title' => $page_title,
'notes_feed_title' => (new Heading(1, [], $page_title)),
@ -138,7 +141,10 @@ class Conversation extends FeedController
return [
'_template' => 'conversation/mute.html.twig',
'notes' => $this->query(query: "note-conversation:{$conversation_id}")['notes'] ?? [],
'notes' => $this->query(
query: "note-conversation:{$conversation_id}",
note_order_by: ['note.created' => 'ASC', 'note.id' => 'ASC'],
)['notes'] ?? [],
'is_muted' => $is_muted,
'form' => $form->createView(),
];