Skip to content

Commit 75ae3eb

Browse files
octo-patchocto-patch
andauthored
fix: pass quoted option in audioWhatsapp to support replies (fixes #2485) (#2516)
The `audioWhatsapp` method was not forwarding `data.quoted` to `sendMessageWithTyping`, so audio messages sent with a `quoted` key were delivered as standalone messages instead of replies. Added `quoted: data?.quoted` to the options object in both `sendMessageWithTyping` call sites inside `audioWhatsapp` (the encoding path and the direct path), matching the pattern used by all other message-sending methods (textMessage, pollMessage, etc.). Co-authored-by: octo-patch <octo-patch@github.com>
1 parent deb682c commit 75ae3eb

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
@@ -3562,7 +3562,7 @@ export class BaileysStartupService extends ChannelStartupService {
35623562
const result = this.sendMessageWithTyping<AnyMessageContent>(
35633563
data.number,
35643564
messageContent as any,
3565-
{ presence: 'recording', delay: data?.delay },
3565+
{ presence: 'recording', delay: data?.delay, quoted: data?.quoted },
35663566
isIntegration,
35673567
);
35683568

@@ -3588,7 +3588,7 @@ export class BaileysStartupService extends ChannelStartupService {
35883588
mimetype: 'audio/ogg; codecs=opus',
35893589
...(metadata && { seconds: metadata.seconds, waveform: metadata.waveform }),
35903590
},
3591-
{ presence: 'recording', delay: data?.delay },
3591+
{ presence: 'recording', delay: data?.delay, quoted: data?.quoted },
35923592
isIntegration,
35933593
);
35943594
}

0 commit comments

Comments
 (0)