mattermost-community / mattermost-plugin-welcomebot

Apache License 2.0
66 stars 41 forks source link

Add sleep between calls to add user to channels #124

Open mickmister opened 7 months ago

mickmister commented 7 months ago

Summary

There is an issue occurring with the Welcomebot and the Playbooks plugin's Channel Actions "automatically add to channel category" feature, where the user is inadvertently having duplicate channel categories created with the same name. We believe is due to a race condition of adding the user to multiple channels semi-simultaneously. More info in the tickets linked below.

This PR adds a sleep in between adding a user to multiple channels, to avoid this situation. A more holistic solution of handling this issue in the core product is discussed in the Jira ticket below, though this PR can resolve this before the core issue is addressed.

Ticket Link

Fixes https://github.com/mattermost/mattermost-plugin-welcomebot/issues/120

https://mattermost.atlassian.net/browse/MM-54003