[BUG] 2.4.0-rc2: incoming text replies flattened to 'conversation' — contextInfo (stanzaId/quotedMessage/mentionedJid) lost in webhook and storage
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
Rechercherichtung
Start at the MESSAGES_UPSERT webhook handling and the normalization path that produces messageType and the Message table payload; compare 2.4.0-rc2 with the reported 2.3.x behavior. Reproduce a text reply and a media reply, then verify that text replies retain extendedTextMessage.contextInfo, including stanzaId and mentionedJid, in both the webhook and storage.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the bug
On 2.4.0-rc2, incoming text replies (quoted messages) are delivered to webhooks flattened: the message arrives as messageType: "conversation" with only the text and messageSecret — the extendedTextMessage wrapper and its contextInfo (stanzaId, participant, quotedMessage) are destroyed before reaching the webhook consumer. The quote relationship is unrecoverable downstream.
The same flattening happens in Evolution's own storage: our production Message table contains zero rows with messageType = 'extendedTextMessage' (2,164 conversation rows in the last 2 days alone).
Notably, replies with media still work: when a reply is an image/audio/video/document quoting another message, contextInfo is preserved inside the media wrapper (imageMessage.contextInfo, etc.). Only text replies lose the quote.
Sending works fine: POST /message/sendText with quoted: { key: { id }, message: { conversation } } delivers a proper native reply on the device (even though the sent message is also stored flattened as plain conversation — storage-side symptom of the same normalization).
Actual webhook payload (captured, credentials redacted)
The sender replied on his phone (long-press → Reply) to a text message in a group. WhatsApp on both devices shows the quote card. The messages.upsert webhook delivered:
{
"event": "messages.upsert",
"instance": "...",
"data": {
"key": {
"remoteJid": "[email protected]",
"fromMe": false,
"id": "2A7E3A15419D180DE3B4",
"participant": "2581376053441@lid",
"participantAlt": "[email protected]",
"addressingMode": "lid"
},
"pushName": "...",
"message": {
"messageContextInfo": {
"threadId": [],
"messageSecret": { "0": 221, "1": 251, "...": "..." }
},
"conversation": "Teste"
},
"messageType": "conversation",
"messageTimestamp": 1787780498,
"source": "unknown",
"status": "DELIVERY_ACK",
"contextInfo": { "threadId": [], "messageSecret": { "...": "..." } }
}
}
Expected behavior
A text reply should be delivered as it comes from Baileys:
{
"messageType": "extendedTextMessage",
"message": {
"extendedTextMessage": {
"text": "Teste",
"contextInfo": {
"stanzaId": "<quoted message id>",
"participant": "<quoted author jid>",
"quotedMessage": { "conversation": "..." }
}
}
}
}
This worked on v2.3.x (we have integrations built on contextInfo.stanzaId and contextInfo.mentionedJid that were functional before upgrading).
Steps to reproduce
- Run
evoapicloud/evolution-api:2.4.0-rc2(Docker, Postgres provider). - Webhook enabled with
MESSAGES_UPSERT. - From a phone that participates in a group (group using
addressingMode: "lid"in our case), long-press any text message → Reply → send a text reply. - Observe the webhook payload:
messageTypeisconversation, nocontextInfo.stanzaId/quotedMessage. - Also check the
Messagetable: the row is stored as{"conversation": "..."}only. - Counter-test: reply with a photo quoting a message →
imageMessage.contextInfoarrives intact.
Side effect of the same (or related) regression: mentionedJid for text mentions is also lost, since it lives in the same discarded contextInfo.
Environment
- Evolution API: 2.4.0-rc2 (
evoapicloud/evolution-api:2.4.0-rc2) - Deploy: Docker Compose (evolution + postgres:15 + redis)
- Provider: Baileys (WhatsApp Web), single instance, group with
addressingMode: "lid" - Downgrade to 2.3.7 is not viable for us: instances stopped working there after WhatsApp's LID migration (which motivated the upgrade to rc2).
Happy to provide more captured payloads or test a patched build.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 9.7k
- Forks
- 7.3k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus evolution-foundation/evolution-api
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
evolution-foundation/evolution-api#2723 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
evolution-foundation/evolution-api#2704 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
evolution-foundation/evolution-api#2702 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
evolution-foundation/evolution-api#2700 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
evolution-foundation/evolution-api#2675 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in evolution-foundation/evolution-api
Ähnliche Issues
-
triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
mermaid-js/mermaid-live-editor#2053 ·
Maintainer antworten meist innerhalb von 1 Tag
-
factory
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
jessepollak/home#1455 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
lingdojo/kana-dojo#31227 · 1 Kommentar · 5 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
mobile: device viewer shows dark status bar icons on its dark backdrop in light mode (Android)Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
appandflow/stim#1838 ·
Maintainer antworten meist innerhalb von 1 Tag