Querying members with a filter doesn't work
Describe the bug
channel.query_members(
filter_conditions: { id: { "$in" => [user_id] } }
)
always returns all members when using the Ruby client.
In this case user_id = SecureRandom.hex.
I've used byebug to double check a valid user_id was sent through in the filter_conditions yet I kept seeing a list of all users back.
To Reproduce
- Create 2 users in Stream (I used the API to create users)
- Use the
filter_conditions: { id: { "$in" => [user_id] } }inquery_members - Inspect the response
Expected behavior
Only the user which matches user_id to be returned
Package version
stream-chat-ruby (3.0.0)
Desktop (please complete the following information):
- OS: MacOS Ventura 13.2
- Browser: Chrome
- Version: 118.0.5993.70
Additional context
N/A
I was having the same issue while following the docs. The current version takes the filter hash as the first positional arg.
query_members appears to have been introduced in version 2.4.0 with the filter_conditions kwarg, which was later changed to positional arg in 2.5.0.