public function countReactList()
{
$firstPost = $this->db()->fetchRow("
SELECT post_id, thread_id
FROM xf_post
WHERE thread_id = ?
LIMIT 1
", $this->thread_id);
$this->first_post_id = $firstPost['post_id'];
$reactions = \XF::db()->fetchAll('SELECT user.username as username
FROM xf_reaction_content AS reacted
INNER JOIN xf_user AS user ON (reacted.reaction_user_id = user.user_id)
INNER JOIN xf_reaction AS reaction ON (reacted.reaction_id = reaction.reaction_id)
WHERE reacted.content_type = ? AND reacted.content_id = ? AND reaction.active = 1
ORDER BY reacted.reaction_date DESC', ['post', $this->first_post_id]);
$list = array();
foreach($reactions as $like){
$list[] = $like['username'];
}
$list = implode(', ', $list);
return $list;
}