summaryrefslogtreecommitdiff
path: root/public/channels/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/channels/index.php')
-rw-r--r--public/channels/index.php4
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) ?: [];