Skip RAG inbound when reception WhatsApp is enabled on the bot.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d1fc61222e
commit
94714fe749
|
|
@ -113,6 +113,10 @@ async function processInboundMessage(jobData) {
|
||||||
status: 'ACTIVE',
|
status: 'ACTIVE',
|
||||||
}).populate('event', 'name joinCode organization');
|
}).populate('event', 'name joinCode organization');
|
||||||
if (!bot) return;
|
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 eventId = bot.event._id || bot.event;
|
||||||
const eventName = bot.event.name || 'Event';
|
const eventName = bot.event.name || 'Event';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue