Repository navigation
feat(inbox): block manual sends outside the channel messaging window - #1813
Merged
Merged
Conversation
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.
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.
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
resolveMessagingWindowin the SDK.sendOutgoing, with last-line gates in the workersend-messagehandler and the channel outgoing-message handlers.messagingWindowoncontactInboxes[](public API + inbox UI) so clients can see when a send is allowed; message input reflects the state.docs/messaging-window.md, AGENTS.md link.Test plan
pnpm lintpnpm --filter builder check-types/ worker / affected integrationspnpm test(new: sdk messaging-window, send-outgoing, channel outgoing tests, resource tests)