@japofc/baileys - v2.4.7
    Preparing search index...

    Variable createReadReceiptControllerConst

    createReadReceiptController: (
        sendReadReceipt: SendReadReceipt,
        config?: ReadReceiptConfig,
    ) => ReadReceiptController

    Create a read-receipt controller with optional auto-delay and per-JID exclusions.

    Type Declaration

    const readCtrl = createReadReceiptController(
    (jid, participant, ids) => sock.readMessages(ids.map(id => ({ remoteJid: jid, id, participant }))),
    { enabled: true, readDelay: 500, excludeJids: [spamJid] }
    )

    sock.ev.on('messages.upsert', ({ messages }) => {
    for (const msg of messages) {
    const { key } = msg
    if (!key.fromMe)
    readCtrl.markRead(key.remoteJid!, key.participant, [key.id!])
    }
    })