Private
Public Access
Add desktop notification bridge for DS Chat Desktop (#49)
Offline members now also get a desktop_notification WS envelope alongside the existing Web Push send, since Electron has no push delivery service configured. The client only acts on it when window.dsDesktop is present and the user's local preference allows it, so the server needs no awareness of which clients are Electron. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { Navigate, Route, Routes } from 'react-router-dom'
|
||||
import { AuthProvider, useAuth } from './context/AuthContext'
|
||||
import { ChatSocketProvider } from './context/ChatSocketContext'
|
||||
import { AdminRoute } from './components/AdminRoute'
|
||||
import { DesktopNotificationBridge } from './components/DesktopNotificationBridge'
|
||||
import { ProtectedRoute } from './components/ProtectedRoute'
|
||||
import { UpdateBanner } from './components/UpdateBanner'
|
||||
import { LoginPage } from './pages/LoginPage'
|
||||
@@ -55,7 +56,12 @@ function AppRoutes() {
|
||||
// is currently open.
|
||||
const { user } = useAuth()
|
||||
if (!user) return routes
|
||||
return <ChatSocketProvider key={user.id}>{routes}</ChatSocketProvider>
|
||||
return (
|
||||
<ChatSocketProvider key={user.id}>
|
||||
<DesktopNotificationBridge />
|
||||
{routes}
|
||||
</ChatSocketProvider>
|
||||
)
|
||||
}
|
||||
|
||||
function App() {
|
||||
|
||||
Reference in New Issue
Block a user