Replaced direct notification timer cache access with a public method.
CD / Build (push) Successful in 9s
CI / Formatting (push) Failing after 5s
CI / Linting (push) Successful in 6s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s

This commit is contained in:
2026-03-11 15:49:51 -04:00
parent b8447e190c
commit a70fe972c4
2 changed files with 9 additions and 3 deletions
+8
View File
@@ -179,6 +179,14 @@ class NotificationService:
return body_text
def get_last_notification_time(self, domain: str) -> float:
"""Get the timestamp of the last notification sent for a domain.
:param domain: The stream domain.
:return: Unix timestamp of last notification, or 0 if never notified.
"""
return self.notification_timers_cache.get(domain, 0)
def _can_notify(self, domain: str) -> bool:
"""Check if enough time has passed to send another notification.