Skip to content

feat(inbox): block manual sends outside the channel messaging window - #1813

Merged
realcodesiman merged 5 commits into
mainfrom
realcodesiman/message-window
Nov 28, 2026
Merged

realcodesiman merged 5 commits into
mainfrom
realcodesiman/message-window

Conversation

@realcodesiman

Copy link
Copy Markdown
Contributor

Summary

  • Resolve the messaging window per channel (WhatsApp 24h, Messenger/Instagram human-agent tag, TikTok) via a shared resolveMessagingWindow in the SDK.
  • Gate manual sends early in sendOutgoing, with last-line gates in the worker send-message handler and the channel outgoing-message handlers.
  • Expose messagingWindow on contactInboxes[] (public API + inbox UI) so clients can see when a send is allowed; message input reflects the state.
  • Docs: docs/messaging-window.md, AGENTS.md link.

Test plan

  • pnpm lint
  • pnpm --filter builder check-types / worker / affected integrations
  • pnpm test (new: sdk messaging-window, send-outgoing, channel outgoing tests, resource tests)
  • Manually verify the inbox input is disabled outside the window and enabled inside, per channel

Resolve the messaging window per channel (WhatsApp 24h, Messenger/Instagram
human-agent tag, TikTok) and gate manual sends early in sendOutgoing, with
last-line gates in the worker and channel handlers. Expose messagingWindow on
contactInboxes[] so the inbox UI and API clients can see when a send is allowed.
@github-actions github-actions Bot added the feature New feature or request label Nov 28, 2026
Move the window gate into assertManualSendWindowOpen in the business
layer so the builder, public API and worker share one implementation,
and drop the per-channel duplicates in WhatsApp and TikTok.
…ion service tests

The gate imports flow services at module scope, which pulled real schema
resources into these suites' mocked schema and failed CI.
@realcodesiman
realcodesiman merged commit 872db4c into main Nov 28, 2026
14 checks passed
@realcodesiman
realcodesiman deleted the realcodesiman/message-window branch November 28, 2026 04:55
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