From f8fb3656270c670910ce775af3e25eba967c3cbd Mon Sep 17 00:00:00 2001 From: Lennart Kuijs Date: Sat, 17 Jan 2026 14:04:17 +0100 Subject: [PATCH 1/2] feat: [CHA-1699] add Future Channel Bans support - Add query_future_channel_bans method - ban_user/unban_user already support options for new parameters --- lib/stream-chat/client.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/stream-chat/client.rb b/lib/stream-chat/client.rb index 642872a..3788614 100644 --- a/lib/stream-chat/client.rb +++ b/lib/stream-chat/client.rb @@ -485,6 +485,15 @@ def query_banned_users(filter_conditions, sort: nil, **options) get('query_banned_users', params: { payload: params.to_json }) end + # Queries future channel bans. + # + # Future channel bans are automatically applied when a user creates a new channel + # or adds a member to an existing channel. + sig { params(options: T.untyped).returns(StreamChat::StreamResponse) } + def query_future_channel_bans(**options) + get('query_future_channel_bans', params: { payload: options.to_json }) + end + # Allows you to search for users and see if they are online/offline. # You can filter and sort on the custom fields you've set for your user, the user id, and when the user was last active. sig { params(filter_conditions: StringKeyHash, sort: T.nilable(T::Hash[String, Integer]), options: T.untyped).returns(StreamChat::StreamResponse) } From 06ad838a94b6229966104abb80b9a30bb20e8fe4 Mon Sep 17 00:00:00 2001 From: Lennart Kuijs Date: Sun, 18 Jan 2026 13:36:36 +0100 Subject: [PATCH 2/2] feat: [CHA-1702] Add options parameter to channel.unban_user for FCB support Allow passing remove_future_channels_ban option to the channel unban method. Co-Authored-By: Claude Opus 4.5 --- lib/stream-chat/channel.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/stream-chat/channel.rb b/lib/stream-chat/channel.rb index 6fe2eb6..641f52e 100644 --- a/lib/stream-chat/channel.rb +++ b/lib/stream-chat/channel.rb @@ -323,9 +323,9 @@ def ban_user(user_id, **options) end # Removes the ban for a user on this channel. - sig { params(user_id: String).returns(StreamChat::StreamResponse) } - def unban_user(user_id) - @client.unban_user(user_id, type: @channel_type, id: @id) + sig { params(user_id: String, options: T.untyped).returns(StreamChat::StreamResponse) } + def unban_user(user_id, **options) + @client.unban_user(user_id, type: @channel_type, id: @id, **options) end # Removes a channel from query channel requests for that user until a new message is added.