Fix: Multi-line messages now captured in project routing

Added 's' flag (dotall) to regex so . matches newlines.
Previously only first line of multi-line messages was captured.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
RichardDillman
2025-12-07 16:31:22 -05:00
parent 93d65d9a34
commit e26d94dcc2

View File

@@ -411,7 +411,8 @@ bot.on('text', async (ctx) => {
} }
// Check if message is targeted to a specific project: "ProjectName: message" // Check if message is targeted to a specific project: "ProjectName: message"
const projectMatch = message.match(/^([a-zA-Z0-9-_]+):\s*(.+)/); // Use 's' flag (dotall) so . matches newlines for multi-line messages
const projectMatch = message.match(/^([a-zA-Z0-9-_]+):\s*(.+)/s);
if (projectMatch) { if (projectMatch) {
const [, targetProject, actualMessage] = projectMatch; const [, targetProject, actualMessage] = projectMatch;