diff options
| author | mnowicki <mnowicki@anthropic.com> | 2026-09-20 23:36:19 -0400 |
|---|---|---|
| committer | mnowicki <mnowicki@anthropic.com> | 2026-09-20 23:36:19 -0400 |
| commit | db51d043624ae35fdbe1d81719cd04391e81a63c (patch) | |
| tree | d8f1898dd092a236a3df925b4f5aa2ae03f59d17 /external_plugins/telegram | |
| parent | c447c3207a425bc4e2a0d068435f64b0477ae981 (diff) | |
fix(telegram, discord): parse .env with CRLF line endings or a UTF-8 BOMfix/channels-env-crlf-bom
Diffstat (limited to 'external_plugins/telegram')
| -rw-r--r-- | external_plugins/telegram/.claude-plugin/plugin.json | 2 | ||||
| -rw-r--r-- | external_plugins/telegram/server.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/external_plugins/telegram/.claude-plugin/plugin.json b/external_plugins/telegram/.claude-plugin/plugin.json index 41b42894..8dc878c6 100644 --- a/external_plugins/telegram/.claude-plugin/plugin.json +++ b/external_plugins/telegram/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "telegram", "description": "Telegram channel for Claude Code \u2014 messaging bridge with built-in access control. Manage pairing, allowlists, and policy via /telegram:access.", - "version": "0.0.7", + "version": "0.0.8", "keywords": [ "telegram", "messaging", diff --git a/external_plugins/telegram/server.ts b/external_plugins/telegram/server.ts index 6bc0ebc6..0a0576c3 100644 --- a/external_plugins/telegram/server.ts +++ b/external_plugins/telegram/server.ts @@ -35,7 +35,7 @@ const ENV_FILE = join(STATE_DIR, '.env') try { // Token is a credential — lock to owner. No-op on Windows (would need ACLs). chmodSync(ENV_FILE, 0o600) - for (const line of readFileSync(ENV_FILE, 'utf8').split('\n')) { + for (const line of readFileSync(ENV_FILE, 'utf8').replace(/^\uFEFF/, '').split(/\r?\n/)) { const m = line.match(/^(\w+)=(.*)$/) if (m && process.env[m[1]] === undefined) process.env[m[1]] = m[2] } |
