Added sockets for notifications

This commit is contained in:
2026-06-30 21:42:51 +10:00
parent 6cadd3d9e6
commit 6978510147
7 changed files with 62 additions and 17 deletions
+7 -5
View File
@@ -7,12 +7,14 @@ import Pusher from 'pusher-js';
window.Pusher = Pusher;
const { data } = await axios.get('/broadcasting/config');
window.Echo = new Echo({
broadcaster: 'reverb',
key: import.meta.env.VITE_REVERB_APP_KEY,
wsHost: import.meta.env.VITE_REVERB_HOST,
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
key: data.key,
wsHost: data.host,
wsPort: data.port,
wssPort: data.port,
forceTLS: data.scheme === 'https',
enabledTransports: ['ws', 'wss'],
});