mattermost-coffeebot
mattermost-coffeebot copied to clipboard
Inactive team users should not be paired
Coffeebot has been extremely useful with pairing, thank you. I looked through the code, but haven't yet wrapped my head around why inactive users get paired. There have been a few recent occasions where Coffeebot will pair inactive users with active Mattermost users inside the defined #coffeebot channel. Similar to how bots are excluded, it would be a win if Coffeebot could also exclude users with the inactive user role. In particular, I think this is the only exclusion:
# Return all of the user IDs excluding the bot's user ID (don't want to
# count the bot as a user in pairings)
members = [
member['user_id'] for member in response if (
member['user_id'] != bot_id)]
In addition to inactive members, I'd find it very useful if there could also be an exclusion list (e.g. for admin users, other bots etc.).
Hi @variablenix, not sure if you're still using coffeebot, but I've submitted a PR in a forked repo that we're using to filter out inactive users.