add handler mapping

This commit is contained in:
josedario87
2025-06-04 21:37:55 -06:00
parent 0836c086b2
commit 85d61c64b4
3 changed files with 18 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
export const chatHandlers: Record<string, string> = {
// Example mapping:
// '50496210031@c.us': 'http://llm-agent:8000'
};
export function getHandler(chatId: string | undefined, defaultUrl?: string): string | undefined {
if (!chatId) return defaultUrl;
return chatHandlers[chatId] || defaultUrl;
}