feat: add notification for tickets in waiting status

Details:
- Implemented notification functionality for tickets that are in waiting status.
feat-scaling-ticket-remote-creation
gustavo-gsp 2024-03-20 14:33:36 -03:00
parent 82863f9d0e
commit 9b6e48f54e
1 changed files with 2 additions and 0 deletions

View File

@ -529,6 +529,7 @@ const transferTicket = async (
sendGreetingMessage?: boolean sendGreetingMessage?: boolean
) => { ) => {
const botInfo = await BotIsOnQueue("botqueue"); const botInfo = await BotIsOnQueue("botqueue");
const io = getIO();
const queuesWhatsGreetingMessage = await queuesOutBot( const queuesWhatsGreetingMessage = await queuesOutBot(
wbot, wbot,
@ -548,6 +549,7 @@ const transferTicket = async (
} }
if (queue) await botTransferTicket(queue, ticket, sendGreetingMessage); if (queue) await botTransferTicket(queue, ticket, sendGreetingMessage);
io.emit('notifyPeding', {data: {ticket, queue}});
}; };
const botTransferTicket = async ( const botTransferTicket = async (