问题
I have been trying to enable auto-fill to grab slack channel list in my app and wondering if there is any api available that would let me search both public and private channels based on user input queries like if i want to look for "slack admins" private channel if i type "sl" it should give me list of all channels with those 2 letters in subsequent way . its basically search of channel names
回答1:
Usually auto complete will only work for public channels, but there is a way to get it to work with private channels too.
- Retrieve the list of private channels with groups.list
- Build a Message Menu using the list of private channels as items (using the "Simple Menu" approach)
You will get a drop-down menu with a search box that has a build-in autocomplete feature for all menu items.
来源:https://stackoverflow.com/questions/43813790/slack-channel-auto-complete-search-api