From 0af8a7c3f5a8e88c1f566ad3b5291a082803b5b7 Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Wed, 25 Mar 2026 07:15:24 +0900 Subject: [PATCH] fix: restore wide file extension list for inbound attachment parsing The narrowed list (.txt, .md, .csv, .json, .log) was for outbound, but was mistakenly applied to inbound. Restore full list for user file uploads (input direction). --- src/channels/discord.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/channels/discord.ts b/src/channels/discord.ts index 0a718c2..179e0a3 100644 --- a/src/channels/discord.ts +++ b/src/channels/discord.ts @@ -271,7 +271,9 @@ export class DiscordChannel implements Channel { return `[Audio: ${att.name || 'audio'}]`; } else if ( contentType.startsWith('text/') || - /\.(txt|md|csv|json|log)$/i.test(att.name || '') + /\.(txt|md|json|csv|log|xml|yaml|yml|toml|ini|cfg|conf|sh|bash|zsh|py|js|ts|jsx|tsx|html|css|sql|rs|go|java|c|cpp|h|hpp|rb|php|swift|kt|scala|r|lua|pl|ex|exs|hs|ml|clj|dart|v|zig|nim|ps1|bat|cmd|mjs|cjs)$/i.test( + att.name || '', + ) ) { // Download and inline text-based files try {