File tree Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -585,31 +585,8 @@ function SessionPage() {
585585 return user ?. id || ''
586586 }
587587
588- // Request notification permission on component mount
589- const requestNotificationPermission = async ( ) => {
590- if ( 'Notification' in window && Notification . permission === 'default' ) {
591- try {
592- await Notification . requestPermission ( )
593- } catch ( error ) {
594- console . warn ( 'Failed to request notification permission:' , error )
595- }
596- }
597- }
598-
599- // Show notification when tab is not visible
600588 const showRoomClosedNotification = ( message : string ) => {
601- if ( 'Notification' in window && Notification . permission === 'granted' ) {
602- const notification = new Notification ( 'MOQtail Room Closed' , {
603- body : message ,
604- icon : '/moqtail.ico' ,
605- requireInteraction : true , // Keep notification visible until user interacts
606- } )
607-
608- notification . onclick = ( ) => {
609- window . focus ( )
610- notification . close ( )
611- }
612- }
589+ alert ( `MOQtail Room Closed: ${ message } ` )
613590 }
614591
615592 // Check if document is visible
@@ -1821,9 +1798,6 @@ function SessionPage() {
18211798
18221799 // Request notification permission and handle page visibility changes
18231800 useEffect ( ( ) => {
1824- // Request notification permission on mount
1825- requestNotificationPermission ( )
1826-
18271801 // Handle page visibility changes to show pending room closed messages
18281802 const handleVisibilityChange = ( ) => {
18291803 if ( ! document . hidden && pendingRoomClosedMessage ) {
You can’t perform that action at this time.
0 commit comments