Incoming text replies lose contextInfo (stanzaId / quotedMessage) — arrive as plain conversation

Open
#2,794 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api, backend

Research direction

Start by tracing the Baileys messages.upsert handling and the findMessages storage path; the issue does not name specific files or tests. Compare incoming text replies addressed by LID with the working audio/image and outgoing reply cases, then check how the quoted message context is preserved. Done means both the webhook payload and stored record retain contextInfo.stanzaId and contextInfo.quotedMessage for incoming quoted text replies.

Written by the indexing model from the issue text.

Description

Version: Evolution API v2.4.0 (Baileys), self-hosted

What happens
When a contact replies (quotes) one of our messages using a text message, the messages.upsert webhook delivers:

"message": { "conversation": "reply text here" }

No extendedTextMessage, no contextInfo, so stanzaId and quotedMessage are lost. The same happens in the record stored by findMessages.

What works

  • Replies sent as audio or image keep contextInfo.stanzaId / quotedMessage correctly.
  • Replies sent by us (fromMe: true) keep contextInfo correctly.

Observed with

  • Chats addressed by LID (remoteJid ending in @lid, real number in remoteJidAlt). We sampled ~800 stored records: no incoming text message from a contact had contextInfo, while audio/image replies did.

Expected
Incoming quoted text replies should arrive as extendedTextMessage with contextInfo.stanzaId and contextInfo.quotedMessage, as on the WhatsApp app.

Possibly related: #2065, #2645, #1872, PR #1818 (none describes exactly this case).

Dominant language
TypeScript
Stars
10.2k
Forks
7.5k
Avg merge
6d 19h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evolution-foundation/evolution-api

All issues in evolution-foundation/evolution-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.