summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-05-08 02:12:01 +0500
committerilotterytea <iltsu@alright.party>2025-05-08 02:12:01 +0500
commit655a39a31859f7d414a0eb055ee0771f09f25bc5 (patch)
treef9d25ca86a99b3122989fd9e75457f51098cc8e3 /public
parent2cceb6f38983d958e6ba7bb6e607f5c74ef06c27 (diff)
fix: emote check bug
Diffstat (limited to 'public')
-rw-r--r--public/emotes/index.php3
1 files changed, 2 insertions, 1 deletions
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