diff --git a/src/app/api/webhooks/whatsapp/route.ts b/src/app/api/webhooks/whatsapp/route.ts index ecf06c4..3a54631 100644 --- a/src/app/api/webhooks/whatsapp/route.ts +++ b/src/app/api/webhooks/whatsapp/route.ts @@ -48,10 +48,10 @@ export async function POST(req: Request) { return NextResponse.json({ success: true, message: 'Ignored bot self-message loop' }, { status: 200 }); } - // Recomendado: filtrar por el grupo especĂ­fico - // if (remoteJid !== TARGET_GROUP_JID) { - // return NextResponse.json({ success: true, message: 'Ignored other chat' }, { status: 200 }); - // } + // Filtrar estrictamente para que SOLO procese mensajes del grupo 'Publicaciones Almeira' + if (remoteJid !== TARGET_GROUP_JID) { + return NextResponse.json({ success: true, message: 'Ignored other chat' }, { status: 200 }); + } // Extraer texto del mensaje (ya guardado en rawText, lo mantenemos como text para retrocompatibilidad interna) const text = rawText;