Skip to content

Commit 3b3aa12

Browse files
authored
Merge branch 'master' into cha-1610-update-channels-batch
2 parents 93baff3 + 1b67323 commit 3b3aa12

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

lib/stream-chat/channel.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ def ban_user(user_id, **options)
339339
end
340340

341341
# Removes the ban for a user on this channel.
342-
sig { params(user_id: String).returns(StreamChat::StreamResponse) }
343-
def unban_user(user_id)
344-
@client.unban_user(user_id, type: @channel_type, id: @id)
342+
sig { params(user_id: String, options: T.untyped).returns(StreamChat::StreamResponse) }
343+
def unban_user(user_id, **options)
344+
@client.unban_user(user_id, type: @channel_type, id: @id, **options)
345345
end
346346

347347
# Removes a channel from query channel requests for that user until a new message is added.

lib/stream-chat/client.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,15 @@ def query_banned_users(filter_conditions, sort: nil, **options)
486486
get('query_banned_users', params: { payload: params.to_json })
487487
end
488488

489+
# Queries future channel bans.
490+
#
491+
# Future channel bans are automatically applied when a user creates a new channel
492+
# or adds a member to an existing channel.
493+
sig { params(options: T.untyped).returns(StreamChat::StreamResponse) }
494+
def query_future_channel_bans(**options)
495+
get('query_future_channel_bans', params: { payload: options.to_json })
496+
end
497+
489498
# Allows you to search for users and see if they are online/offline.
490499
# 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.
491500
sig { params(filter_conditions: StringKeyHash, sort: T.nilable(T::Hash[String, Integer]), options: T.untyped).returns(StreamChat::StreamResponse) }

0 commit comments

Comments
 (0)