Private
Public Access
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:
1 parent
250bb862f6
commit
278f8bb995
7 files changed
+120
-68
No files matched your search
@@ -68,9 +68,10 @@ export function hideDm(roomId: string): Promise<void> {
|
||||
return apiFetch<void>(`/api/rooms/${roomId}/hide`, { method: 'POST' })
|
||||
}
|
||||
|
||||
// #67: per-viewer opt-in for email-on-mention in this room. 400s for a DM
|
||||
// (backend rejects it -- see set_room_email_notifications), so callers
|
||||
// should only expose the toggle for a non-DM room.
|
||||
// #67: per-viewer opt-in for email on this room's first unread message
|
||||
// and every mention. 400s for a DM (backend rejects it -- see
|
||||
// set_room_email_notifications), so callers should only expose the
|
||||
// toggle for a non-DM room.
|
||||
export function updateRoomNotifications(roomId: string, emailNotifications: boolean): Promise<void> {
|
||||
return apiFetch<void>(`/api/rooms/${roomId}/notifications`, {
|
||||
method: 'PATCH',
|
||||
|
||||
Reference in new issue
Block a user