diff --git a/backend/src/services/WbotServices/wbotMessageListener.ts b/backend/src/services/WbotServices/wbotMessageListener.ts index 23f181f..5ed94fb 100644 --- a/backend/src/services/WbotServices/wbotMessageListener.ts +++ b/backend/src/services/WbotServices/wbotMessageListener.ts @@ -981,7 +981,7 @@ const startQueue = async (wbot: Session, ticket: Ticket, queue: Queue) => { !isNil(currentSchedule) && (!currentSchedule || currentSchedule.inActivity === false) ) { - const outOfHoursMessage = queue.outOfHoursMessage.trim() || "Estamos fora do horĂ¡rio de expediente"; + const outOfHoursMessage = queue.outOfHoursMessage?.trim() || "Estamos fora do horĂ¡rio de expediente"; const body = formatBody(`${outOfHoursMessage}\n\n*[ # ]* - Voltar ao Menu Principal`, ticket.contact); const sentMessage = await wbot.sendMessage( `${contact.number}@${ticket.isGroup ? "g.us" : "s.whatsapp.net"}`, {