forked from EvolutionAPI/evolution-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
After deploying the ad thumbnail fix (EvolutionAPI#2408), backfill the 29 messages that failed to sync to Chatwoot in the past 7 days.
Context
These messages exist in Evolution DB with chatwootMessageId = NULL and contain externalAdReply data. Once the fix is deployed, these historical messages need to be manually synced.
Affected Messages Query
SELECT
m.key->>'id' AS message_id,
m.key->>'remoteJid' AS remote_jid,
to_timestamp(m."messageTimestamp") AS ts,
m."instanceId"
FROM "Message" m
WHERE m."chatwootMessageId" IS NULL
AND m."messageTimestamp" > EXTRACT(EPOCH FROM NOW() - INTERVAL '7 days')
AND (
m."contextInfo"->'externalAdReply' IS NOT NULL
OR m.message->'extendedTextMessage'->'contextInfo'->'externalAdReply' IS NOT NULL
OR m.message->'imageMessage'->'contextInfo'->'externalAdReply' IS NOT NULL
);Approach Options
- Manual re-trigger: Call
chatwootService.eventWhatsapp()for each message - Script: Write a one-time migration script to process these messages
- API endpoint: Create a temporary admin endpoint to re-sync specific messages
Acceptance Criteria
- All 29 messages appear in their respective Chatwoot conversations
chatwootMessageIdis populated for each message in Evolution DB
Dependencies
- Blocked by fix: Ad messages fail to sync to Chatwoot due to unprotected thumbnail download EvolutionAPI/evolution-api#2408 (must deploy fix first)
References
- Troubleshooting doc:
docs/troubleshooting/02-02-26-mama-first-realtime-lid-missing-ads-autoreply.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request