Skip to content

Commit fc00916

Browse files
committed
fix: Corrige o erro Unable to fit integer value '1747658857155' into an INT4 (32-bit signed integer.
## 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.
1 parent 7cccda1 commit fc00916

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,8 +1173,8 @@ export class BaileysStartupService extends ChannelStartupService {
11731173
const oldMessage = await this.getMessage(editedMessage.key, true);
11741174
if ((oldMessage as any)?.id) {
11751175
const editedMessageTimestamp = Long.isLong(editedMessage?.timestampMs)
1176-
? editedMessage.timestampMs?.toNumber()
1177-
: (editedMessage.timestampMs as number);
1176+
? Math.floor(editedMessage.timestampMs.toNumber() / 1000) // Convert to int32 by dividing by 1000 to get seconds
1177+
: Math.floor((editedMessage.timestampMs as number) / 1000); // Convert to int32 by dividing by 1000 to get seconds
11781178

11791179
await this.prismaRepository.message.update({
11801180
where: { id: (oldMessage as any).id },

0 commit comments

Comments
 (0)