diff --git a/read_mattermost.py b/read_mattermost.py index 0ae8ace..8c3f787 100755 --- a/read_mattermost.py +++ b/read_mattermost.py @@ -78,12 +78,10 @@ channel = channel_data["id"] ################################## # Get users -# People who are authorized to grant pancakes +# People who are authorized to do verifications tagger_ids = {u["id"]: u["username"] for u in mm.get_users_by_usernames_list(TAGGERS)} - users = {u["id"]: u for u in mm.get_users(in_channel=channel)} - for user in users.values(): assert user["username"].find(" ") == -1, f"{user['username']} shouldn't have spaces in username" @@ -92,7 +90,9 @@ def get_username(userid): if userid not in users: users[userid] = mm.get_user(userid) - return users[userid]["username"] + username = users[userid]["username"] + assert username.find(" ") == -1, f"{username} shouldn't have spaces in username" + return username ##################################