From fc00916345ef771f6fd8778fdf12506d0b825370 Mon Sep 17 00:00:00 2001 From: Willian Coqueiro Date: Mon, 19 May 2025 23:05:11 +0000 Subject: [PATCH] fix: Corrige o erro Unable to fit integer value '1747658857155' into an INT4 (32-bit signed integer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Solução Após analise dos valores recebidos e seguindo a logica em outras partes também, se confirma que o valor de entrada é de timestamp em ms. --- .../integrations/channel/whatsapp/whatsapp.baileys.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index aa8f245c..5a180df4 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -1173,8 +1173,8 @@ export class BaileysStartupService extends ChannelStartupService { const oldMessage = await this.getMessage(editedMessage.key, true); if ((oldMessage as any)?.id) { const editedMessageTimestamp = Long.isLong(editedMessage?.timestampMs) - ? editedMessage.timestampMs?.toNumber() - : (editedMessage.timestampMs as number); + ? Math.floor(editedMessage.timestampMs.toNumber() / 1000) // Convert to int32 by dividing by 1000 to get seconds + : Math.floor((editedMessage.timestampMs as number) / 1000); // Convert to int32 by dividing by 1000 to get seconds await this.prismaRepository.message.update({ where: { id: (oldMessage as any).id },