Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/stream-chat/channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions lib/stream-chat/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down