• Get message ACK from a message

    Parameters

    Returns Promise<{
        ack: ACK;
        deliveryRemaining: number;
        fromMe: boolean;
        participants: ParticipantStatusACK[];
        playedRemaining: number;
        readRemaining: number;
    }>

    Any

    Example

    // Get message ACK
    const ackInfo = await WPP.chat.getMessageACK('true_[number]@c.us_ABCDEF');

    console.log(ackInfo.deliveryRemaining); // Delivery Remaining
    console.log(ackInfo.readRemaining); // Read Remaining
    console.log(ackInfo.playedRemaining); // PlayedRemaining, for audio(ptt) only

    console.log(ackInfo.participants[0].deliveredAt); // Delivered At, in timestamp format
    console.log(ackInfo.participants[0].readAt); // Read At, in timestamp format
    console.log(ackInfo.participants[0].playedAt); // Played At, in timestamp format, for audio(ptt) only

    //To get only how was received
    const received = ackInfo.participants.filter(p => p.deliveredAt || p.readAt || p.playedAt);

    //To get only how was read
    const read = ackInfo.participants.filter(p => p.readAt || p.playedAt);

    //To get only how was played
    const played = ackInfo.participants.filter(p => p.playedAt);