diff options
| author | moderndevslulw <moderndevslulw@alright.party> | 2025-07-08 17:17:25 +0500 |
|---|---|---|
| committer | moderndevslulw <moderndevslulw@alright.party> | 2025-07-08 17:17:25 +0500 |
| commit | 7b74d27ec8c2abc75673ba9dcf1820bfdb032215 (patch) | |
| tree | 11b25197fb0fe3ca3b026fb0e18af33cd0b98a69 | |
| parent | c81c9922de026904c7b6f3fb55ac36c0e59899ac (diff) | |
upd: ignore silent channels
| -rw-r--r-- | public/channels/index.php | 4 |
1 files changed, 3 insertions, 1 deletions
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) ?: []; |
