feat(webhook): lock processing to specific whatsapp group only
This commit is contained in:
parent
77fadb03be
commit
6e296f9296
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user