From e16bb0e58074ebf0cf083c7fff5941dc2c8c3c50 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Wed, 21 May 2025 15:14:41 -0300 Subject: [PATCH] style(whatsapp): format code for consistency - Adjusted spacing in destructuring assignments for `remoteJid` in multiple locations to enhance code readability and maintain consistency with coding standards. - Removed unnecessary blank lines to streamline the code structure. This commit focuses on improving the overall style of the `whatsapp.baileys.service.ts` file without altering any functionality. --- .../channel/whatsapp/whatsapp.baileys.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index 78774e09..ddb73d5f 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -1311,7 +1311,7 @@ export class BaileysStartupService extends ChannelStartupService { data: messageRaw, }); - const {remoteJid} = received.key; + const { remoteJid } = received.key; const timestamp = msg.messageTimestamp; const fromMe = received.key.fromMe.toString(); const messageKey = `${remoteJid}_${timestamp}_${fromMe}`; @@ -1584,7 +1584,7 @@ export class BaileysStartupService extends ChannelStartupService { if (!key.fromMe && key.remoteJid) { readChatToUpdate[key.remoteJid] = true; - const {remoteJid} = key; + const { remoteJid } = key; const timestamp = findMessage.messageTimestamp; const fromMe = key.fromMe.toString(); const messageKey = `${remoteJid}_${timestamp}_${fromMe}`; @@ -3797,7 +3797,7 @@ export class BaileysStartupService extends ChannelStartupService { break; } } - + if (!mediaMessage) { throw 'The message is not of the media type'; } @@ -3862,7 +3862,7 @@ export class BaileysStartupService extends ChannelStartupService { buffer: getBuffer ? buffer : null, }; } catch (error) { - this.logger.error('Error processing media message:'); + this.logger.error('Error processing media message:'); this.logger.error(error); throw new BadRequestException(error.toString()); }