Repository navigation
feat: [CHA-5933] add scheduled messages - #374
Open
nijeesh-stream wants to merge 2 commits into
Open
nijeesh-stream wants to merge 2 commits into
nijeesh-stream wants to merge 2 commits into
Conversation
Regenerate from chat master 39c07c8b1ce1a145a754e883721796c66467f313 and cover the scheduled message endpoints with an integration test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
szuperaz
approved these changes
Oct 15, 2026
oliverlaz
approved these changes
Oct 16, 2026
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.
TLDR
Adds Chat scheduled messages to the SDK:
sendMessagetakesscheduled_at(the response then carriesscheduled_messageinstead of posting to the channel), and four new chat methods manage pending ones:queryScheduledMessages,updateScheduledMessage,sendScheduledMessageNow,deleteScheduledMessage. It is a plain regeneration from the backend spec plus one integration test. Because this SDK was behind chatmaster, the regeneration also picks up other API changes (listed below), including a few removed moderation "intent" fields that are breaking for anyone who used them.Risk: merge only after backend CHA-5924 is deployed. Older backends ignore
scheduled_atand send the message immediately.Ticket
Summary
Generated from protocol release
openapi-v239.72.0(chatv239.72.0). Merge after backend CHA-5924 is deployed, because older backends ignorescheduled_atand send immediately.The first version of this PR was generated from a local spec at chat master
39c07c8b. I regenerated it from the release: the spec built at chatv239.72.0is byte-identical to the protocol release yaml. The regeneration changed only two doc comments,ScheduledMessageResponse.statusandScheduledMessagesFilter.status, from GetStream/chat#18730.generate-openapi.shran unchanged, with../chatchecked out at tagv239.72.0. Itsmake openapioutput is identical to the protocol release spec. Thenyarn lint:gen.Scheduled messages (CHA-5924 backend: GetStream/chat#18596, #18597, #18655, #18656)
SendMessageRequest.scheduled_at/SendMessageResponse.scheduled_messageChatApi.queryScheduledMessages(POST /api/v2/chat/scheduled_messages/query). Server-side calls needuser_id.ChatApi.updateScheduledMessage(PATCH /api/v2/chat/scheduled_messages/{id})ChatApi.sendScheduledMessageNow(POST /api/v2/chat/scheduled_messages/{id}/send_now)ChatApi.deleteScheduledMessage(DELETE /api/v2/chat/scheduled_messages/{id})ChannelStateResponse.scheduled_messages, plus theScheduledMessage*models and thescheduled_message.sent/scheduled_message.failedwebhook eventsThe feature is off by default per app; Stream enables it. The new test (
__tests__/scheduled-messages.test.ts) schedules a message and then queries, updates, sends now and deletes. It skips itself when the test app returns error 114 (feature disabled) or when the backend ignoresscheduled_at. So until the test app has the feature, CI shows these tests as skipped. I ran it locally against a chatmasterserver with the feature on, and all 4 tests passed.Unrelated changes picked up since the last release
Breaking (removed):
IntentDetectedEventandIntentBufferedItemare removed, along with themoderation.intent_detectedmember of theWHEventunion.CheckResponse:intent_matched_topic,intent_score,intent_score_thresholdandintent_would_fireare removed, andintent_scores: IntentScoreResponse[]replaces them.IntentTopicRequest/IntentTopicResponse:analysis_cooldown_seconds,enabled,max_captured_items,refire_cooldown_secondsandscore_thresholdare removed. Intent now lives in rule-builder conditions (RuleBuilderCondition.intent_rule_params).Tightened types (now required):
ChannelMemberResponse.user_id,OwnUserResponse.blocked_user_ids.Additive:
ChannelApi.queryChannelBans, plusQueryChannelBans*and theChannelBan*modelscooldown_remaining_msonAPIErrorandChannelStateResponseGroupedQueryChannelsRequest.sortandfilter_conditionson grouped-channel groupsAppResponseFields.defaultsPollClosedEvent,PollUpdatedEvent,PollVote*Event, …)config_key/config_teamon the poll write requestshard_deleteondeleteCollectionsCallSettings*.lifecycleandClientEvent.leave_reason/leave_initiatorskip_existingon add/upsert activities,async+task_idon batch follow/unfollow,include_group_countsonqueryFollows,ranking_config/include_ranking_config,parent_idon notification comments, and the feeds push template event typesllm_model/llm_reasoning_efforton check/analyze, thedelete_poll*review actions,ReviewQueueItemResponse.pollandUserChannelBanCountRuleParametersChecklist
yarn lintandtsc(src) pass🤖 Generated with Claude Code