From 7b74d27ec8c2abc75673ba9dcf1820bfdb032215 Mon Sep 17 00:00:00 2001 From: moderndevslulw Date: Tue, 8 Jul 2025 17:17:25 +0500 Subject: upd: ignore silent channels --- public/channels/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public/channels') diff --git a/public/channels/index.php b/public/channels/index.php index cdb09b2..edd86eb 100644 --- a/public/channels/index.php +++ b/public/channels/index.php @@ -122,7 +122,9 @@ if (isset($_GET['alias_id'])) { http_response_code(403); exit; } else { - $stmt = $db->query('SELECT alias_id, alias_name FROM channels WHERE opted_out_at IS NULL ORDER BY joined_at DESC'); + $stmt = $db->query('SELECT c.alias_id, c.alias_name FROM channels c + INNER JOIN channel_preferences cp ON cp.id = c.id + WHERE c.opted_out_at IS NULL AND cp.silent_mode = FALSE ORDER BY c.joined_at DESC'); $stmt->execute(); $channels = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: []; -- cgit v1.2.3