Skip to content

Commit

Permalink
fix: corrigido o funcionamento do número máximo de retentativas do bot.
Browse files Browse the repository at this point in the history
fix: #41
  • Loading branch information
ldurans committed Nov 14, 2022
1 parent ee96ffc commit 22d4ba6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ const isRetriesLimit = async (
flowConfig: any
): Promise<boolean> => {
// verificar o limite de retentativas e realizar ação
const maxRetryNumber = flowConfig?.configurations?.maxRetryBotMessage?.number;
if (
flowConfig?.configurations?.maxRetryBotMessage &&
ticket.botRetries > flowConfig?.configurations?.maxRetryBotMessage?.number
maxRetryNumber &&
ticket.botRetries >= maxRetryNumber - 1
) {
const destinyType = flowConfig.configurations.maxRetryBotMessage.type;
const { destiny } = flowConfig.configurations.maxRetryBotMessage;
Expand Down

0 comments on commit 22d4ba6

Please sign in to comment.