From 3d40b0850b4b5de2ab2647cb20ec0c5532b1e764 Mon Sep 17 00:00:00 2001 From: pedro-php Date: Fri, 28 Mar 2025 10:57:59 -0300 Subject: [PATCH] lint changes --- .../whatsapp/whatsapp.baileys.service.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index 36e31ebf..13d48944 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -382,7 +382,7 @@ export class BaileysStartupService extends ChannelStartupService { qrcodeTerminal.generate(qr, { small: true }, (qrcode) => this.logger.log( `\n{ instance: ${this.instance.name} pairingCode: ${this.instance.qrcode.pairingCode}, qrcodeCount: ${this.instance.qrcode.count} }\n` + - qrcode, + qrcode, ), ); @@ -1023,18 +1023,18 @@ export class BaileysStartupService extends ChannelStartupService { const messagesRepository: Set = new Set( chatwootImport.getRepositoryMessagesCache(instance) ?? - ( - await this.prismaRepository.message.findMany({ - select: { key: true }, - where: { instanceId: this.instanceId }, - }) - ).map((message) => { - const key = message.key as { - id: string; - }; + ( + await this.prismaRepository.message.findMany({ + select: { key: true }, + where: { instanceId: this.instanceId }, + }) + ).map((message) => { + const key = message.key as { + id: string; + }; - return key.id; - }), + return key.id; + }), ); if (chatwootImport.getRepositoryMessagesCache(instance) === null) { @@ -1132,7 +1132,8 @@ export class BaileysStartupService extends ChannelStartupService { } } - const editedMessage = received?.message?.protocolMessage || received?.message?.editedMessage?.message?.protocolMessage; + const editedMessage = + received?.message?.protocolMessage || received?.message?.editedMessage?.message?.protocolMessage; if (received.message?.protocolMessage?.editedMessage && editedMessage) { if (this.configService.get('CHATWOOT').ENABLED && this.localChatwoot?.enabled) @@ -1145,7 +1146,6 @@ export class BaileysStartupService extends ChannelStartupService { await this.sendDataWebhook(Events.MESSAGES_EDITED, editedMessage); const oldMessage = await this.getMessage(editedMessage.key, true); if ((oldMessage as any)?.id) { - if (Long.isLong(editedMessage?.timestampMs)) { editedMessage.timestampMs = editedMessage.timestampMs?.toNumber(); } @@ -1169,7 +1169,6 @@ export class BaileysStartupService extends ChannelStartupService { }, }); } - } // if (received.messageStubParameters && received.messageStubParameters[0] === 'Message absent from node') { @@ -3980,7 +3979,8 @@ export class BaileysStartupService extends ChannelStartupService { edit: data.key, }); if (messageSent) { - const editedMessage = messageSent?.message?.protocolMessage || messageSent?.message?.editedMessage?.message?.protocolMessage; + const editedMessage = + messageSent?.message?.protocolMessage || messageSent?.message?.editedMessage?.message?.protocolMessage; if (editedMessage) { this.sendDataWebhook(Events.SEND_MESSAGE_UPDATE, editedMessage);