#15474·botpress

whatsapp: messageReadBehavior 'none' still marks incoming messages as read (breaks coexistence)

Author: todoplasticCreated Sep 11, 2026Updated Sep 11, 2026

Bug

integrations/whatsapp (v4.18.5): the messages webhook handler calls whatsapp.markAsRead(phoneNumberId, message.id) unconditionally (src/webhook/handlers/messages.ts, line 47), so the messageReadBehavior option "none" only suppresses the typing indicator (src/actions/typing-indicator.ts) while every incoming message is still marked as read.

The option's own description says "none" "will do neither and block the typing indicator's emoji (leaving the message unread until a reply is sent)".

Why it matters

With WhatsApp Business app coexistence, a read receipt sent through the Cloud API marks the chat as read in the WhatsApp Business app of every human agent, even when the bot decides not to reply (e.g. while gating which customers the bot handles). Agents cannot tell which chats are still unanswered.

Fix

Only send the read receipt when ctx.configuration.messageReadBehavior !== 'none'. One-line change (PRs are restricted to collaborators, so I could not open one; happy to if you enable it):

typescript
  const phoneNumberId = value.metadata.phone_number_id
  if (ctx.configuration.messageReadBehavior !== 'none') {
    await whatsapp.markAsRead(phoneNumberId, message.id)
  }

Verified

Deployed as a private fork on a production coexistence line: with "none" a message the bot does not answer stays "Delivered" (grey ticks) on the customer side and unread for the agents; with the stock integration it flipped to "Read" immediately. mark_as_read and typing_indicator (default) are unchanged.