Clarified comments and docstrings.
CI / Formatting (push) Successful in 6s
CI / Linting (push) Successful in 6s
CI / Tests (push) Successful in 29s
CI / Type Checking (push) Successful in 23s
CI / Spelling (push) Successful in 40s

This commit is contained in:
2026-05-18 14:37:36 -04:00
parent 2f6d0bc1ed
commit 4d0ae3d1ea
12 changed files with 57 additions and 57 deletions
+4 -3
View File
@@ -183,10 +183,11 @@ class NotificationService:
)
def get_last_notification_time(self, domain: str) -> float:
"""Get the timestamp of the last notification sent for a domain.
"""Get the cached live/title-change notification timestamp for a domain.
:param domain: The stream domain.
:return: Unix timestamp of last notification, or 0 if never notified.
:return: Monotonic timestamp of the last successful live/title-change
notification, or 0 if none has been recorded.
"""
return self.notification_timers_cache.get(domain, 0)
@@ -205,7 +206,7 @@ class NotificationService:
:param room_id: The Matrix room ID to send to.
:param body_text: The message body text.
:param domain: The stream domain (for logging).
:raises Exception: If sending fails.
Propagates send errors so broadcast delivery accounting can count failures.
"""
try:
content = TextMessageEventContent(msgtype=MessageType.TEXT, body=body_text)