mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: receipt not being sent on empty message
This commit is contained in:
@@ -357,6 +357,11 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
messageTimestamp: dec.timestamp,
|
messageTimestamp: dec.timestamp,
|
||||||
pushName: dec.pushname
|
pushName: dec.pushname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!dec.failures.length) {
|
||||||
|
await sendMessageAck(stanza, { class: 'receipt' })
|
||||||
|
}
|
||||||
|
|
||||||
// if there were some successful decryptions
|
// if there were some successful decryptions
|
||||||
if(dec.successes.length) {
|
if(dec.successes.length) {
|
||||||
// send message receipt
|
// send message receipt
|
||||||
@@ -388,8 +393,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
await sendNode({ tag: 'receipt', attrs: recpAttrs })
|
await sendNode({ tag: 'receipt', attrs: recpAttrs })
|
||||||
logger.debug({ msgId: dec.msgId }, 'sent message receipt')
|
logger.debug({ msgId: dec.msgId }, 'sent message receipt')
|
||||||
|
|
||||||
await sendMessageAck(stanza, { class: 'receipt' })
|
|
||||||
|
|
||||||
await sendDeliveryReceipt(dec.chatId, dec.participant, [dec.msgId])
|
await sendDeliveryReceipt(dec.chatId, dec.participant, [dec.msgId])
|
||||||
logger.debug({ msgId: dec.msgId }, 'sent delivery receipt')
|
logger.debug({ msgId: dec.msgId }, 'sent delivery receipt')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user