Skip to content

feat(inbox): expose closed-window send options per channel - #1825

Closed
realcodesiman wants to merge 0 commit into
mainfrom
feat/messaging-window-closed-send-options
Closed

realcodesiman wants to merge 0 commit into
mainfrom
feat/messaging-window-closed-send-options

Conversation

@realcodesiman

Copy link
Copy Markdown
Contributor

Summary

  • The messaging window now reports closedSendOptions (WhatsApp template, WhatsApp template flow, Messenger template flow) so the composer and the manual-send gate share one per-channel policy instead of a hardcoded template step list.
  • Conversation contact inboxes also carry integrationWhatsappId, so the composer can offer WhatsApp templates when the window is closed.

Changes

  • packages/sdk messaging-window.ts: closedSendOptions on each channel policy and on MessagingWindow; CLOSED_SEND_OPTION_STEP_TYPE maps flow options to first-step types.
  • packages/business: assertManualSendWindowOpen derives allowed first-step types from the policy; conversation service loads integrationWhatsapp id.
  • apps/builder: conversation resource schema, list-conversations query, select-flow dialog, and message input use the new fields.
  • Tests updated in sdk, business, and builder.

Test plan

  • Commit hooks: typecheck + ultracite fix
  • pnpm lint
  • WhatsApp closed window: template and template-flow sends allowed, free-form refused
  • Messenger closed window: only template-flow allowed
  • Instagram/TikTok closed window: nothing allowed

This branch was previously deployed

1 inactive deployment
dev — 544292b2 Deployed Dec 1, 2026 by realcodesiman via output-image-urls #3188
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant