From 01e85cde4343f9fedae4fc9981f308bdac6ada5c Mon Sep 17 00:00:00 2001 From: mk-pmb Date: Sat, 4 Oct 2025 20:08:34 +0200 Subject: [PATCH] [minor] Simplify code for splitting blocked channels list. --- lib/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server.js b/lib/server.js index ea733c0..aac126f 100644 --- a/lib/server.js +++ b/lib/server.js @@ -181,7 +181,7 @@ const [ this.raw.write(`id: ${this.message_count++}\n${event ? `event: ${event}\n` : ''}data: ${JSON.stringify(payload)}\n\n`) }) - const channelsBlocked = new Set(process.env.BLOCKED_CHANNELS ? process.env.BLOCKED_CHANNELS.split(',') : []) + const channelsBlocked = new Set((process.env.BLOCKED_CHANNELS || '').split(',')) const channelsBlockedHandler = channelsBlocked.size !== 0 ? (req, reply, done) => {