Keep push notifications on screen until dismissed

Without requireInteraction, the OS default auto-dismiss (a few seconds
on most platforms) was closing notifications before they were
reliably noticed. Browser/PWA push only -- the Desktop bridge is a
separate codebase with its own native notification handling.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-19 15:18:59 -06:00
co-authored by Claude Sonnet 5
parent 0a91f4f347
commit 222ca49355
+4
View File
@@ -115,6 +115,10 @@ self.addEventListener('push', (event) => {
icon: '/icons/icon-192.png',
badge: '/icons/icon-192.png',
data: { room_id: payload.room_id },
// Without this, the OS default auto-dismiss (a few seconds on most
// platforms) closes it long before anyone reliably notices -- stays
// on screen until the user actually dismisses or clicks it instead.
requireInteraction: true,
}),
)
})