feat(webhook): lock processing to specific whatsapp group only

This commit is contained in:
AI Bot 2026-08-24 10:36:54 -05:00
parent 77fadb03be
commit 6e296f9296

View File

@ -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;