fix(messenger): show flow images and videos to every recipient - #1086
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/me/message_attachmentsand sent amediatemplate referencing the returnedattachment_id. Meta only renders that reference for people who can already see the Page-owned upload. Reproduced with the raw Graph API on a published Page: the media template payload is accepted but not rendered; the same file sent as a plainattachment { type, payload: { url } }renders for everyone. App permissions, Page publish state, and restrictions were ruled out.Changes
integrations/messenger/src/handlers/message/outgoing-message/send-media-v2.ts: new converter with a delivery-mode table —inline(plain URL attachment viagetAttachmentTemplate, node quick replies attached) when the step has no buttons,mediaTemplate(delegates to the untouchedconvertFlowStepMedia) when it has buttons.outgoing-message/index.ts:sendImage/sendVideoroute to the new converter (import + one switch case). Rollback is reverting that import.integrations/messenger/__tests__/send-media-v2.test.ts: inline image/video, quick replies present/absent, URL forwarded verbatim, buttons fallback for image/video with quick replies, upload failure on the buttons path still swallowed as before, dispatcher envelope and metadata, mapped Graph fetch error, private comment-anchor routing for inline and template payloads.docs/plans/2026-09-03-messenger-send-media-inline-url.md: root cause, Meta doc references, industry comparison, design, review rounds, follow-ups.Test plan
pnpm lintpnpm --filter @chatbotx.io/integration-messenger check-typesNotes
message:failed, error recorded) instead of silently producing a "sent" message with nothing delivered. The buttons path keeps its previous behaviour.sendAudio/sendFileupload path, Instagram-via-Facebook media template, consolidating the quick-reply spread shared by the media converters.