Ajustes para mensagens fora do expediente
parent
763d707ca5
commit
05faebe89c
|
@ -53,7 +53,6 @@ import BotIsOnQueue from "../../helpers/BotIsOnQueue";
|
|||
import Queue from "../../models/Queue";
|
||||
import SettingTicket from "../../models/SettingTicket";
|
||||
|
||||
|
||||
import fs from "fs";
|
||||
|
||||
import { StartWhatsAppSession } from "../../services/WbotServices/StartWhatsAppSession";
|
||||
|
@ -1238,7 +1237,15 @@ const handleMessage = async (msg: any, wbot: any): Promise<void> => {
|
|||
|
||||
let ticketHasQueue = false;
|
||||
|
||||
if (ticket?.queueId) {
|
||||
if (
|
||||
botInfo.isOnQueue &&
|
||||
ticket?.queueId &&
|
||||
botInfo.botQueueId != ticket?.queueId
|
||||
) {
|
||||
console.log("BOT SECTION");
|
||||
ticketHasQueue = true;
|
||||
} else if (!botInfo.isOnQueue && ticket?.queueId) {
|
||||
console.log("NO BOT SECTION");
|
||||
ticketHasQueue = true;
|
||||
}
|
||||
|
||||
|
@ -1282,7 +1289,6 @@ const handleMessage = async (msg: any, wbot: any): Promise<void> => {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
Sentry.captureException(err);
|
||||
console.log("xxxxxxxxxxxxx err: ", err);
|
||||
|
|
Loading…
Reference in New Issue