From e7c402c5e201ce94f3db7b8f189da094859d8d1e Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sun, 12 Nov 2023 09:37:16 +1100 Subject: [PATCH] schedulebot: Make user ids case-insensitive --- zulip_bots/zulip_bots/schedulebot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zulip_bots/zulip_bots/schedulebot.py b/zulip_bots/zulip_bots/schedulebot.py index 0b28c0d..a20bd59 100644 --- a/zulip_bots/zulip_bots/schedulebot.py +++ b/zulip_bots/zulip_bots/schedulebot.py @@ -182,9 +182,10 @@ def post_schedule(client, send_client, start_time, schedule, stream, hour, no_me def parse_schedule(user_ids, schedule_file): schedule = {} + user_ids = {user.lower(): id for user, id in user_ids.items()} with open(schedule_file) as f: for row in csv.reader(f): - name = row[0] + name = row[0].lower() if name in ["", "Chat Member", "Hour of the Run"] or name.startswith("-") or name.startswith("["): continue if name not in user_ids: