Skip to content

feat: restore attachment fetchData after queue/debounce serialization#338

Draft
dancer wants to merge 6 commits intomainfrom
josh/fix-fetchdata-serialization
Draft

feat: restore attachment fetchData after queue/debounce serialization#338
dancer wants to merge 6 commits intomainfrom
josh/fix-fetchdata-serialization

Conversation

@dancer
Copy link
Copy Markdown
Contributor

@dancer dancer commented Apr 6, 2026

summary

attachment fetchData closures are lost when messages pass through queue/debounce concurrency strategies because JSON.stringify strips functions during enqueue. after dequeue and rehydration, handlers get fetchData: undefined and can't download files

adds fetchMetadata field to Attachment for storing platform-specific IDs that survive serialization (e.g. WhatsApp mediaId, Telegram fileId, Google Chat resourceName), and rehydrateAttachment optional method to Adapter for rebuilding fetchData closures from those IDs after deserialization

implemented in all five adapters that use fetchData: slack, whatsapp, telegram, gchat, teams

closes #323
closes #299

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 6, 2026 7:31pm
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 6, 2026 7:31pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attachment fetchData lost after debounce/queue serialization No attachment fetchData in WhatsApp queued messages

1 participant