From 071bacb48c13b4e736976a6ff4d246edb12b503e Mon Sep 17 00:00:00 2001 From: Ben C Date: Fri, 13 Mar 2026 14:59:40 -0400 Subject: [PATCH] Handle REPLY_CHANNELS being an empty string --- src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 20bb041..b78d8ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -150,7 +150,13 @@ async fn main() -> Result { let reply_channels = std::env::var("REPLY_CHANNELS") .context("Missing REPLY_CHANNELS env var")? .split(",") - .map(|s| s.trim().parse::().map(|c| Id::new(c))) + .filter_map(|s| { + if s.trim().is_empty() { + None + } else { + Some(s.trim().parse::().map(|c| Id::new(c))) + } + }) .collect::>() .context("Invalid channel IDs for REPLY_CHANNELS")?; let brain_file_path = -- 2.51.2