@@ -554,7 +554,7 @@ export class ChatwootService {
554554
555555 // If it already exists in the cache, return conversationId
556556 if ( await this . cache . has ( cacheKey ) ) {
557- const conversationId = await this . cache . get ( cacheKey ) as number ;
557+ const conversationId = ( await this . cache . get ( cacheKey ) ) as number ;
558558 this . logger . verbose ( `Found conversation to: ${ remoteJid } , conversation ID: ${ conversationId } ` ) ;
559559 return conversationId ;
560560 }
@@ -568,9 +568,9 @@ export class ChatwootService {
568568 this . logger . warn ( `Timeout aguardando lock para ${ remoteJid } ` ) ;
569569 break ;
570570 }
571- await new Promise ( res => setTimeout ( res , 300 ) ) ;
571+ await new Promise ( ( res ) => setTimeout ( res , 300 ) ) ;
572572 if ( await this . cache . has ( cacheKey ) ) {
573- const conversationId = await this . cache . get ( cacheKey ) as number ;
573+ const conversationId = ( await this . cache . get ( cacheKey ) ) as number ;
574574 this . logger . verbose ( `Resolves creation of: ${ remoteJid } , conversation ID: ${ conversationId } ` ) ;
575575 return conversationId ;
576576 }
@@ -587,7 +587,7 @@ export class ChatwootService {
587587 Utilizei uma nova verificação para evitar que outra thread execute entre o terminio do while e o set lock
588588 */
589589 if ( await this . cache . has ( cacheKey ) ) {
590- return await this . cache . get ( cacheKey ) as number ;
590+ return ( await this . cache . get ( cacheKey ) ) as number ;
591591 }
592592
593593 const client = await this . clientCw ( instance ) ;
@@ -2525,4 +2525,4 @@ export class ChatwootService {
25252525 return ;
25262526 }
25272527 }
2528- }
2528+ }
0 commit comments