mattermost-coffeebot icon indicating copy to clipboard operation
mattermost-coffeebot copied to clipboard

Inactive team users should not be paired

Open variablenix opened this issue 5 years ago • 2 comments

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)]

variablenix avatar Feb 07 '20 23:02 variablenix

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.).

Absynth723 avatar Jul 23 '20 06:07 Absynth723

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.

adjurk avatar Nov 23 '22 11:11 adjurk