Skip to content

Commit

Permalink
Merge pull request #1038 from fmedeiros95/develop
Browse files Browse the repository at this point in the history
Ajuste nos tipos de mensagem respondidas
  • Loading branch information
DavidsonGomes authored Nov 11, 2024
2 parents 8dc2791 + 50d84d1 commit 997acee
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4259,6 +4259,19 @@ export class BaileysStartupService extends ChannelStartupService {
delete messageRaw.message.documentWithCaptionMessage;
}

const quotedMessage = messageRaw?.contextInfo?.quotedMessage;
if (quotedMessage) {
if (quotedMessage.extendedTextMessage) {
quotedMessage.conversation = quotedMessage.extendedTextMessage.text;
delete quotedMessage.extendedTextMessage;
}

if (quotedMessage.documentWithCaptionMessage) {
quotedMessage.documentMessage = quotedMessage.documentWithCaptionMessage.message.documentMessage;
delete quotedMessage.documentWithCaptionMessage;
}
}

return messageRaw;
}

Expand Down

0 comments on commit 997acee

Please sign in to comment.