镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat!: [CHA-5933] add scheduled messages - #117

Open
nijeesh-stream wants to merge 1 commit into
mainfrom
feat/cha-5933-scheduled-messages
Open

nijeesh-stream wants to merge 1 commit into
mainfrom
feat/cha-5933-scheduled-messages

Conversation

@nijeesh-stream

@nijeesh-stream nijeesh-stream commented Oct 14, 2026 •

Copy link
Copy Markdown

TLDR

Adds Chat scheduled messages to the SDK. SendMessageRequest.scheduledAt stores the message to send later; the response then carries scheduledMessage and nothing is posted to the channel. Four new Chat methods manage pending messages: queryScheduledMessages, updateScheduledMessage, sendScheduledMessageNow and deleteScheduledMessage. This is a regeneration from the backend spec plus one integration test. The SDK was behind chat master, so the regen also picks up other API changes, listed below. Some are breaking: the moderation "intent" classes and fields are removed, hence feat!.

Risk: merge this only after backend CHA-5924 is deployed. Older backends ignore scheduled_at and send the message immediately.

Ticket

Summary

Generated from protocol release openapi-v239.72.0 (chat v239.72.0). Merge after backend CHA-5924 is deployed, because older backends ignore scheduled_at and send immediately.

The first version of this PR was generated from a local spec at chat master 39c07c8b. Regenerating from the release produced no file changes. In the other six SDKs the regen changed only two status doc comments (GetStream/chat#18730), and the Java models don't carry field descriptions. The head commit therefore already matches openapi-v239.72.0.

generate.sh ran with ../chat checked out at tag v239.72.0. Its make openapi output is byte-identical to the protocol release spec. The script runs generate-client --language java, generate-webhook-fixtures, the CallParticipant fix and ./gradlew clean spotlessApply build -x test. Locally the Gradle step needed a Java 21 toolchain passed with -Porg.gradle.java.installations.paths.

This overlaps with the open regen in #116 (generated from an older chat master). Whichever merges second will rebase to a near-empty diff.

Scheduled messages (backend: GetStream/chat#18596, #18597, #18655, #18656)

  • SendMessageRequest.scheduledAt / SendMessageResponse.scheduledMessage
  • Chat.queryScheduledMessages (POST /api/v2/chat/scheduled_messages/query). Server-side calls need userID.
  • Chat.updateScheduledMessage (PATCH /api/v2/chat/scheduled_messages/{id})
  • Chat.sendScheduledMessageNow (POST /api/v2/chat/scheduled_messages/{id}/send_now)
  • Chat.deleteScheduledMessage (DELETE /api/v2/chat/scheduled_messages/{id})
  • ChannelStateResponse.scheduledMessages, the ScheduledMessage* models, and the scheduled_message.sent / scheduled_message.failed webhook events in Webhook

Scheduled messages are off by default per app; Stream enables them. The new ChatScheduledMessageIntegrationTest schedules a message, then queries, updates, sends now and deletes. It skips itself through JUnit Assumptions when the app returns error 114 (feature disabled) or the backend ignores scheduled_at, so those 4 tests show as skipped until the test app has the feature. Locally against a chat master server with the feature on, all 4 pass with none skipped.

Hand-written addition required to compile

services/framework/MultipartRequest.java is an empty marker interface. Since GetStream/chat#17967 (CHA-5084), the generator adds implements io.getstream.services.framework.MultipartRequest to the four upload request models. No SDK PR has added that interface yet, so any regen from current chat master fails to compile without it. StreamRequest still encodes each upload type explicitly, so upload behaviour is unchanged. Moving it to a generic encoder is CHA-5084's own follow-up.

Unrelated changes picked up since the last release

Breaking (removed or changed):

  • IntentDetectedEvent and IntentBufferedItem are removed, along with Webhook.MODERATION_INTENT_DETECTED.
  • CheckResponse: intentMatchedTopic, intentScore, intentScoreThreshold and intentWouldFire are removed. intentScores (List<IntentScoreResponse>) replaces them.
  • IntentTopicRequest / IntentTopicResponse: analysisCooldownSeconds, enabled, maxCapturedItems, refireCooldownSeconds and scoreThreshold are removed. Intent now lives in rule-builder conditions (RuleBuilderCondition.intentRuleParams).
  • GetFeedsRetentionPolicyResponse.policies and SetFeedsRetentionPolicyResponse.policy change from RetentionPolicy to the new FeedsRetentionPolicy.

Additive:

  • Chat
    • queryChannelBans and the ChannelBan* models
    • cooldownRemainingMs on APIError and ChannelStateResponse
    • GroupedQueryChannelsRequest.sort and group filterConditions
    • AppResponseFields.defaults
    • BanRequest.banFromFutureChannels / deleteReactions
    • poll webhook events and configKey/configTeam on the poll write requests
    • EventHook.gcpPubsub* and checkGCPPubSub
  • Video
    • CallSettings*.lifecycle and ClientEvent.leaveReason/leaveInitiator
    • queryCallRingAttempts and the call.ring_settled event
  • Feeds
    • commentFeedback and the feeds.comment.feedback event
    • skipExisting on add/upsert activities
    • async/taskID on the batch follow/unfollow calls
    • includeGroupCounts on queryFollows
    • rankingConfig, RankingConfig.excludeBelow and degradedSelectors
    • ActivitySelectorConfig.timeBudgetMs
    • hidden on comment responses and parentID on notification comments
    • feedGroups on retention policies
    • pinned-activities and query filters
  • Moderation
    • llmModel/llmReasoningEffort
    • the deletePoll* review actions
    • ReviewQueueItemResponse.poll/countryCode
    • ContentCountryCodeParameters and UserChannelBanCountRuleParameters
    • the export.label_results.* events
    • AIAudioConfig*.llmConfig/aiTextConfig

Checklist

  • ./gradlew build, test and spotlessCheck pass locally (JDK 21)
  • New integration test, run locally against chat master
  • CI green

BEGIN_COMMIT_OVERRIDE
feat!: [CHA-5933] add scheduled messages: scheduledAt on sendMessage, and queryScheduledMessages, updateScheduledMessage, sendScheduledMessageNow, deleteScheduledMessage
feat!: remove IntentDetectedEvent, IntentBufferedItem and the old intent fields on CheckResponse and IntentTopicRequest/IntentTopicResponse
feat: add queryChannelBans, checkGCPPubSub, commentFeedback, queryCallRingAttempts, call lifecycle settings and poll webhook events
END_COMMIT_OVERRIDE

🤖 Generated with Claude Code

Regenerate from chat master 39c07c8b1ce1a145a754e883721796c66467f313,
add the MultipartRequest marker the generator now emits on upload
requests, and cover the scheduled message endpoints with an
integration test.

The regen drops IntentBufferedItem and IntentDetectedEvent and the old
intent fields on CheckResponse and IntentTopicRequest/Response, which
are no longer in the spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant