add handler mapping
This commit is contained in:
9
whatsapp-router/src/chatHandlers.ts
Normal file
9
whatsapp-router/src/chatHandlers.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user