Repository navigation
[CHA-5933] feat: add scheduled messages support - #221
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
Add Channel#schedule_message (SendMessage with scheduled_at) and Client#update_scheduled_message, #delete_scheduled_message, #send_scheduled_message_now and #query_scheduled_messages. Co-Authored-By: Claude Opus 5.5 <[email protected]>
nijeesh-stream
requested review from
JimmyPettersson85,
shaljam and
vishalnarkhede
as code owners
October 14, 2026 22:29
Contributor
Author
|
CI note: the 🤖 Generated with Claude Code |
1 of 3 tasks
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 server-side support for Chat scheduled messages: schedule a message for a user, then edit it, cancel it, send it right away, or list a user's scheduled messages. Backend endpoints are behind a per-app flag and not yet released; merge after backend CHA-5924 ships. Risk is low: the change only adds new methods, and existing calls are untouched.
Linear: https://linear.app/stream/issue/CHA-5933
CLA
Description of the pull request
New methods, mirroring the reminders / drafts layout:
Channel#schedule_message(message, user_id, scheduled_at, **options)POST /channels/{type}/{id}/messagewithscheduled_at; the response carriesscheduled_messageClient#update_scheduled_message(id, message:, scheduled_at:)PATCH /scheduled_messages/{id}Client#delete_scheduled_message(id)DELETE /scheduled_messages/{id}Client#send_scheduled_message_now(id)POST /scheduled_messages/{id}/send_nowClient#query_scheduled_messages(user_id, filter:, sort:, **options)POST /scheduled_messages/query(filter.cid,filter.status,limit,next)scheduled_atacceptsDateTime,Timeor an RFC 3339 string, normalized likeremind_at. Docs: newdocs/messages/scheduled_messages.md, plus thescheduled_message.sent/scheduled_message.failedwebhook events indocs/webhooks/webhook_events.md. CHANGELOG is left to the release tooling.Not added:
include_scheduled_messageson GetOrCreateChannel (the backend ignores it for server-side calls), app settings (thechat_scheduled_messages_*flags aren't exposed through the app settings API), and a permission constant (the SDK has no list of v2 permission actions).Tests
spec/scheduled_messages_spec.rb: checks the request shape against a stubbed Faraday adapter. It needs no credentials and always runs.spec/client_spec.rb→scheduled messages: live round trip (schedule, query, update, send now, delete). It skips when the app has the feature off (scheduled messages are not enabled) or the backend ignoresscheduled_at, so CI stays green until the flag is on for the CI app.feature/cha-5924-scheduled-messages-channel-state, using an app with the flag on. They skip as expected against an app with the flag off. Rubocop andsrb tcare clean (no new Sorbet errors).🤖 Generated with Claude Code