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).
This commit is contained in:
Eyejoker
2026-03-25 07:15:24 +09:00
parent ab408ab998
commit 0af8a7c3f5

View File

@@ -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 {