[CARDS][Note] AppendCardNote event overhaul

[PLUGINS][Favourite] Added complementary information on user action

[COMPONENTS][Conversation] Fixed AppendCardNote issue where cached query
would only act on Notes with depth > 1
This commit is contained in:
2021-12-29 17:54:02 +00:00
parent 0caec6ab9e
commit 836560f55f
7 changed files with 83 additions and 80 deletions

View File

@@ -354,7 +354,7 @@ class Note extends Entity
*/
public function getReplies(): array
{
return Cache::get('note-replies-' . $this->getId(), fn () => DB::dql('select n from note n where n.reply_to = :id', ['id' => $this->getId()]));
return DB::findBy('note', ['reply_to' => $this->getId()], order_by: ['created' => 'DESC', 'id' => 'DESC']);
}
/**