From 655a39a31859f7d414a0eb055ee0771f09f25bc5 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Thu, 8 May 2025 02:12:01 +0500 Subject: fix: emote check bug --- public/emotes/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'public/emotes') diff --git a/public/emotes/index.php b/public/emotes/index.php index 7c76522..55232a9 100644 --- a/public/emotes/index.php +++ b/public/emotes/index.php @@ -27,7 +27,8 @@ function display_list_emotes(PDO &$db, string $search, string $sort_by, int $pag SELECT 1 FROM emote_set_contents ec INNER JOIN emote_sets es ON es.id = ec.emote_set_id - WHERE ec.emote_id = e.id AND es.owner_id = ? + JOIN acquired_emote_sets aes ON aes.emote_set_id = es.id + WHERE ec.emote_id = e.id AND es.owner_id = ? AND aes.is_default = TRUE ) THEN 1 ELSE 0 END AS is_in_user_set, COALESCE(COUNT(r.rate), 0) AS rating FROM emotes e LEFT JOIN ratings AS r ON r.emote_id = e.id -- cgit v1.2.3