Closed dblock closed 2 years ago
If a team has a lot of channels, then https://github.com/dblock/slack-strava/blob/a775da9c9cc9f5cb37e7d8645f506cf1bd1ebbd3/slack-strava/models/team.rb#L95 will take a very long time and cause another activity update loop to kick in, causing duplicates to be posted.
Need a way to either get only channels that the bot is a member of in a single query, cache, and/or avoid the race condition altogether.
team.slack_client.users_conversations(user: team.bot_user_id).channels
Closed via #135
If a team has a lot of channels, then https://github.com/dblock/slack-strava/blob/a775da9c9cc9f5cb37e7d8645f506cf1bd1ebbd3/slack-strava/models/team.rb#L95 will take a very long time and cause another activity update loop to kick in, causing duplicates to be posted.
Need a way to either get only channels that the bot is a member of in a single query, cache, and/or avoid the race condition altogether.