alexkvak / teamcity-slack

TeamCity Slack plugin
MIT License
124 stars 23 forks source link

Unable to find new channels #127

Closed Wildpipe closed 3 years ago

Wildpipe commented 3 years ago

Hi,

I've recently updated the bot from version 1.8.1 -> 2.1.0 and the bot is now unable to find newly created channels. I've restarted TeamCity multiple times since creating the channels just to be sure the channel list is up to date.

I've done some testing and it seems that any channel created after ~25th of June just generates an "Unable to find channel with name XXX" Is it possible we've hit some limit in number of channels the bot is able to grab from the Slack API? I see no errors in the teamcity-server.log so I'm not sure what's going wrong.

I've also used the slack api tester (https://api.slack.com/methods/conversations.list/test ) to verify that my channel is appearing in the list and using a limit of 1000 it shows up. However using the default 100 it does not show up.

alexkvak commented 3 years ago

Which token type do you use? Old Slack app or modern Slack bot app with scopes?

Wildpipe commented 3 years ago

I use modern slack bot app with scopes. The reason I updated the plugin to 2.1.0 was that the new token didn't work in the old version.

alexkvak commented 3 years ago

Sorry for delay. Could you try the solution from #129?

Wildpipe commented 3 years ago

The bot is already joined to the channel if I check under integrations in the channel. I did however not perform my API testing using the public_channel,private_channel in the types field. My initial testing just left it at default which is only public_channel.

Re-running my queries on https://api.slack.com/methods/conversations.list/test using the public_channel,private_channel option results in my channel not being found! Increasing the limit from 1000 to 10000 makes no difference though. still unable to find the channel.

alexkvak commented 3 years ago

Looks like bug in Slack API?

Wildpipe commented 3 years ago

Yea, I agree. Looks like something with the Slack API is not working.

alexkvak commented 3 years ago

Probably you have the same issue as #129

Could you try v2.1.3 release?

Wildpipe commented 3 years ago

Tried 2.1.3 and it works. Thanks for the quick help!

alexkvak commented 3 years ago

Cool! Thanks for report!

Feel free to star this repo 🙂