slack-ruby / slack-ruby-client

A Ruby and command-line client for the Slack Web, Real Time Messaging and Event APIs.
MIT License
1.21k stars 214 forks source link

Conversations List not working when asking for both public and private channels #397

Closed alex-benoit closed 2 years ago

alex-benoit commented 2 years ago

slack_client.conversations_list(types: 'public_channel,private_channel', exclude_archived: true) only returns public channels but should return both public and private channels as defined here

slack_client.conversations_list(types: 'private_channel', exclude_archived: true) does return private channels but public_channel,private_channel only public channels

dblock commented 2 years ago
  1. Check whether the client passes these through correctly to Slack, there's no code in the client that alters types, so I expect it to. If that's the case, contact slack because their doc seems to say this should "just work".
  2. Would be nice if the client accepted an array for types.
alex-benoit commented 2 years ago

You are right when using https://api.slack.com/methods/conversations.list/test with the correct type mentioned in the docs, it also only returns the public channels. Submitted a bug report will report back.

dblock commented 2 years ago

Let's close this here since it's not a client bug. Thanks for following up @alex-benoit! Do post the outcome here when you find out.

Also while you wait, want to implement (2)? I want to also be able to write

slack_client.conversations_list(types: ['private_channel', 'public_channel'], exclude_archived: true)