Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am writing a Slack application which uses the Python slack_sdk to send messages to Slack channels, but checks if they exist first (uses conversations.list) - if a channel does not exist, it gets created using conversations.create. The problem is that calling the conversations.list API returns a list of channels as expected, but the newly-created channel is not included in the list, so subsequent checks by my application show the channel as being non-existent and so conversations.create fails with the error message name taken.

Is this a bug or am I missing something?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
415 views
Welcome To Ask or Share your Answers For Others

1 Answer

Found out the problem to be pagination. conversations.list returns a paginated list.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...