Skip RAG inbound when reception WhatsApp is enabled on the bot.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ravi Gulhane 2026-08-17 09:50:52 +05:30
parent d1fc61222e
commit 94714fe749
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,10 @@ async function processInboundMessage(jobData) {
status: 'ACTIVE',
}).populate('event', 'name joinCode organization');
if (!bot) return;
if (bot.reception && bot.reception.enabled) {
console.log('[inbound] skipping RAG; reception is enabled for this bot');
return;
}
const eventId = bot.event._id || bot.event;
const eventName = bot.event.name || 'Event';