fix: only send auto reply if whatsapp has more then one queue

This commit is contained in:
canove
2021-01-14 08:38:19 -03:00
parent 208e5eedb2
commit 812b5046e1

View File

@@ -255,7 +255,15 @@ const handleMessage = async (
await verifyMessage(msg, ticket, contact);
}
if (!ticket.queue && !chat.isGroup && !msg.fromMe && !ticket.userId) {
const whatsapp = await ShowWhatsAppService(wbot.id!);
if (
!ticket.queue &&
!chat.isGroup &&
!msg.fromMe &&
!ticket.userId &&
whatsapp.queues.length > 1
) {
await verifyQueue(wbot, msg, ticket, contact);
}
} catch (err) {