From 01099062803fef466a8b6ce66ae2020d63adc024 Mon Sep 17 00:00:00 2001 From: rmamet <179627394+rmamet@users.noreply.github.com> Date: Sun, 18 Oct 2026 21:10:43 -0400 Subject: [PATCH 1/3] Attempt to make canceled events not ping --- src/core/announcement_queue.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/announcement_queue.py b/src/core/announcement_queue.py index eebcbb5..1c56bb1 100644 --- a/src/core/announcement_queue.py +++ b/src/core/announcement_queue.py @@ -150,7 +150,14 @@ def check_for_announcement(event: dict[str, Any], time: datetime) -> str | None: message: str | None = None + is_cancelled = False + if "[CANCELLED]" in title: + is_cancelled = True + match description: + case is_cancelled: + message = f"The {title} event has been canceled :bangbang:" + case x if SLACK_NONTECHNICAL_SEMINAR_KEYWORD.lower() in x: message = f" The Non-Technical Seminar {title} will be happening {f'in the {loc} ' if loc else ''}in {MINUTES_BEFORE_EVENT_PING} minutes!" From 749ba13957e938306b8bb8f01ac7d11caffa5612 Mon Sep 17 00:00:00 2001 From: rmamet <179627394+rmamet@users.noreply.github.com> Date: Sun, 18 Oct 2026 21:42:17 -0400 Subject: [PATCH 2/3] Allow both spellings of Cancelled --- src/core/announcement_queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/announcement_queue.py b/src/core/announcement_queue.py index 1c56bb1..718e45a 100644 --- a/src/core/announcement_queue.py +++ b/src/core/announcement_queue.py @@ -151,7 +151,7 @@ def check_for_announcement(event: dict[str, Any], time: datetime) -> str | None: message: str | None = None is_cancelled = False - if "[CANCELLED]" in title: + if ("[CANCELLED]" in title) or ("[CANCELED]" in title): is_cancelled = True match description: From 448797d51d2fcb65811fc05abd0973db75f6bfe5 Mon Sep 17 00:00:00 2001 From: rmamet <179627394+rmamet@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:45:42 -0400 Subject: [PATCH 3/3] Attempt to fix sonarqube or whatever its called... too lazy to check spelling --- src/core/announcement_queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/announcement_queue.py b/src/core/announcement_queue.py index 718e45a..3db8c63 100644 --- a/src/core/announcement_queue.py +++ b/src/core/announcement_queue.py @@ -155,7 +155,7 @@ def check_for_announcement(event: dict[str, Any], time: datetime) -> str | None: is_cancelled = True match description: - case is_cancelled: + case x if is_cancelled: message = f"The {title} event has been canceled :bangbang:" case x if SLACK_NONTECHNICAL_SEMINAR_KEYWORD.lower() in x: