Repository navigation
feat!: [CHA-5933] add scheduled messages - #100
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. 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
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.
SendMessageRequesttakesscheduled_at; the response then carriesscheduled_messageand nothing is posted to the channel yet. Four newChatClientmethods manage pending messages:query_scheduled_messages,update_scheduled_message,send_scheduled_message_nowanddelete_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, hencefeat!:FeedsClient#get_activitygained a positional parameter in the middle of its argument list.AIVideoConfig#providerwas removed.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. Regenerating from the release changed only two doc comments,ScheduledMessageResponse#statusandScheduledMessagesFilter#status, from GetStream/chat#18730.generate.shran unchanged, with../chatchecked out at tagv239.72.0. Itsmake openapioutput is byte-identical to the protocol release spec. That covers the generator, the webhook fixtures (unchanged) and deletingapns.rb. Likegenerate.sh, it leaves stale model files in place.Scheduled messages (CHA-5924 backend: GetStream/chat#18596, #18597, #18655, #18656)
SendMessageRequest#scheduled_at/SendMessageResponse#scheduled_messageChatClient#query_scheduled_messages(POST /api/v2/chat/scheduled_messages/query); server-side calls needuser_idChatClient#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, theScheduledMessage*models, and thescheduled_message.sent/scheduled_message.failedwebhook eventsThe feature is off by default per app; Stream enables it. The new
spec/integration/chat_scheduled_message_integration_spec.rbschedules 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 ignoresscheduled_at. Integration specs run in the daily job, not on PRs. I ran this spec locally against a chatmasterserver with the feature on, and both examples passed.Hand-written change:
GetStream::MultipartRequestThe generator on chat master (GetStream/chat#17967, CHA-5084) now adds
include GetStream::MultipartRequestto the upload request models. Without that module the gem fails to load. This PR adds the module as an empty marker inlib/getstream_ruby/multipart_request.rb. The transport still picks multipart from its existing list inClient#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 newskip_own_followingsparameter sits betweencomment_limitanduser_id. Positional callers passinguser_id,languageortranslate_textmust shift their arguments. New trailing params:include_top_level_comment_count,include_soft_deleted_activities,include_moderated_activities.AIVideoConfig#providerremoved.AsyncExportErrorEventdefaulttypechanged fromexport.channels.errortoexport.users.error.Now required:
ChannelMemberResponse#user_id,OwnUserResponse#blocked_user_ids.Additive (trailing optional params do not break callers):
ChatClient#query_channel_bans,cooldown_remaining_mson errors and channel state,GroupedQueryChannelsRequest#sort,AppResponseFields#defaults, poll events, andconfig_key/config_teamon poll writescheck_gcp_pub_sub, andget_poll_optiongained an optional trailinguser_idcomment_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 configVideoClient#query_call_ring_attempts,CallRingSettledEvent,CallSettings*#lifecycledelete_poll*review actions,llm_model/llm_reasoning_effort, andUserChannelBanCountRuleParametersOpen PR #99 (regen from
openapi-v239.67.0) overlaps with this one. Whichever lands second will conflict inlib/getstream_ruby/generated; re-run the generator to resolve it.Checklist
make test(321 examples, 0 failures) andmake lintpass locally🤖 Generated with Claude Code