Skip to content

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

Open
nijeesh-stream wants to merge 2 commits into
masterfrom
feat/cha-5933-scheduled-messages
Open

nijeesh-stream wants to merge 2 commits into
masterfrom
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 takes scheduled_at; the response then carries scheduled_message and nothing is posted to the channel yet. Four new ChatClient methods manage pending messages: query_scheduled_messages, update_scheduled_message, send_scheduled_message_now and delete_scheduled_message.

This is a plain regeneration from the backend spec plus one integration spec. Because this SDK was behind chat master, the regeneration also picks up other API changes, listed below. Two of them are breaking, hence feat!:

  • FeedsClient#get_activity gained a positional parameter in the middle of its argument list.
  • AIVideoConfig#provider was removed.

Risk: merge 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 changed only two doc comments, ScheduledMessageResponse#status and ScheduledMessagesFilter#status, from GetStream/chat#18730.

generate.sh ran unchanged, with ../chat checked out at tag v239.72.0. Its make openapi output is byte-identical to the protocol release spec. That covers the generator, the webhook fixtures (unchanged) and deleting apns.rb. Like generate.sh, it leaves stale model files in place.

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

  • SendMessageRequest#scheduled_at / SendMessageResponse#scheduled_message
  • ChatClient#query_scheduled_messages (POST /api/v2/chat/scheduled_messages/query); server-side calls need user_id
  • ChatClient#update_scheduled_message (PATCH /api/v2/chat/scheduled_messages/{id})
  • ChatClient#send_scheduled_message_now (POST /api/v2/chat/scheduled_messages/{id}/send_now)
  • ChatClient#delete_scheduled_message (DELETE /api/v2/chat/scheduled_messages/{id})
  • ChannelStateResponse#scheduled_messages, the ScheduledMessage* models, and the scheduled_message.sent / scheduled_message.failed webhook events

The feature is off by default per app; Stream enables it. The new spec/integration/chat_scheduled_message_integration_spec.rb schedules a message, then queries, updates, sends it now, and deletes a second one. It skips when the app returns error 114 (feature disabled) or when the backend ignores scheduled_at. Integration specs run in the daily job, not on PRs. I ran this spec locally against a chat master server with the feature on, and both examples passed.

Hand-written change: GetStream::MultipartRequest

The generator on chat master (GetStream/chat#17967, CHA-5084) now adds include GetStream::MultipartRequest to the upload request models. Without that module the gem fails to load. This PR adds the module as an empty marker in lib/getstream_ruby/multipart_request.rb. The transport still picks multipart from its existing list in Client#multipart_request?, so upload behaviour does not change. Moving the transport onto the marker is the separate CHA-5084 SDK follow-up.

Unrelated changes picked up since the last release

Breaking:

  • FeedsClient#get_activity: a new skip_own_followings parameter sits between comment_limit and user_id. Positional callers passing user_id, language or translate_text must shift their arguments. New trailing params: include_top_level_comment_count, include_soft_deleted_activities, include_moderated_activities.
  • AIVideoConfig#provider removed.
  • AsyncExportErrorEvent default type changed from export.channels.error to export.users.error.

Now required: ChannelMemberResponse#user_id, OwnUserResponse#blocked_user_ids.

Additive (trailing optional params do not break callers):

  • Chat: ChatClient#query_channel_bans, cooldown_remaining_ms on errors and channel state, GroupedQueryChannelsRequest#sort, AppResponseFields#defaults, poll events, and config_key/config_team on poll writes
  • Common: check_gcp_pub_sub, and get_poll_option gained an optional trailing user_id
  • Feeds: comment_feedback; retention policy get/set/delete/runs; upsert_user_interests / delete_user_interests; delete_collections(…, hard_delete); get_comments(…, include_top_level_comment_count); skip_existing; async batch follow/unfollow; include_group_counts; ranking config
  • Video: VideoClient#query_call_ring_attempts, CallRingSettledEvent, CallSettings*#lifecycle
  • Moderation: intent rule parameters, the delete_poll* review actions, llm_model/llm_reasoning_effort, and UserChannelBanCountRuleParameters
  • Async import/export events

Open PR #99 (regen from openapi-v239.67.0) overlaps with this one. Whichever lands second will conflict in lib/getstream_ruby/generated; re-run the generator to resolve it.

Checklist

  • make test (321 examples, 0 failures) and make lint pass locally
  • New integration spec, run locally against chat master
  • CI green

🤖 Generated with Claude Code

nijeesh-stream and others added 2 commits October 15, 2026 01:17
Regenerate from chat master 39c07c8b1ce1a145a754e883721796c66467f313 and
cover the scheduled message endpoints with an integration test. Add the
GetStream::MultipartRequest marker the generator now includes in upload
request models (chat CHA-5084).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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