Also email room subscribers on the first unread message, not just mentions (#67)

The previous pass only emailed on a mention. Corrected scope: the
room's first unread message triggers one debounced email (same shape
as #66), and every mention additionally emails regardless of that
debounce, since a mention shouldn't get silently absorbed by an
earlier plain message's already-sent notification.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-28 19:51:02 -06:00
co-authored by Claude Sonnet 5
parent 250bb862f6
commit 278f8bb995
7 changed files with 120 additions and 68 deletions
+5 -3
View File
@@ -63,9 +63,11 @@ class MyRoomItem(RoomRead):
# avatar, not this room's internal `name`) without a second fetch per
# row. None for a regular room.
dm_partner: DmPartnerInfo | None = None
# #67: this viewer's own opt-in for "email me when mentioned here while
# offline" -- always false for a DM (see message_events.py, deliberately
# out of scope; DMs already get #66's automatic offline email).
# #67: this viewer's own opt-in for email while offline -- the room's
# first unread message plus every mention (see message_events.py's
# _maybe_email_room_notifications for the exact debounce shape). Always
# false for a DM, deliberately out of scope -- DMs already get #66's
# automatic offline email.
email_notifications: bool = False