Use message-receipt.update for status@broadcast events (#833)

This commit is contained in:
allburov
2024-06-01 14:31:04 +07:00
committed by GitHub
parent b2d577409e
commit fda4186306

View File

@@ -32,7 +32,7 @@ import {
getBinaryNodeChild, getBinaryNodeChild,
getBinaryNodeChildBuffer, getBinaryNodeChildBuffer,
getBinaryNodeChildren, getBinaryNodeChildren,
isJidGroup, isJidGroup, isJidStatusBroadcast,
isJidUser, isJidUser,
jidDecode, jidDecode,
jidNormalizedUser, jidNormalizedUser,
@@ -599,7 +599,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
!isNodeFromMe !isNodeFromMe
) )
) { ) {
if(isJidGroup(remoteJid)) { if(isJidGroup(remoteJid) || isJidStatusBroadcast(remoteJid)) {
if(attrs.participant) { if(attrs.participant) {
const updateKey: keyof MessageUserReceipt = status === proto.WebMessageInfo.Status.DELIVERY_ACK ? 'receiptTimestamp' : 'readTimestamp' const updateKey: keyof MessageUserReceipt = status === proto.WebMessageInfo.Status.DELIVERY_ACK ? 'receiptTimestamp' : 'readTimestamp'
ev.emit( ev.emit(