@@ -3,14 +3,12 @@ import { useHistory, useLocation } from 'react-router-dom';
33
44import { RejoinReasonInfo } from '@proton-meet/proton-meet-core' ;
55import { ConnectionState , DisconnectReason , type Room , RoomEvent , Track } from 'livekit-client' ;
6- import { c } from 'ttag' ;
76
87import { useUser } from '@proton/account/user/hooks' ;
9- import useNotifications from '@proton/components/hooks/useNotifications' ;
108import { useMeetErrorReporting } from '@proton/meet' ;
119import { useCreateInstantMeeting } from '@proton/meet/hooks/useCreateInstantMeeting' ;
1210import { useMeetDispatch , useMeetSelector } from '@proton/meet/store/hooks' ;
13- import { setPreviousMeetingLink , setUpsellModalType } from '@proton/meet/store/slices' ;
11+ import { setInvalidMeetingLinkModalOpen , setPreviousMeetingLink , setUpsellModalType } from '@proton/meet/store/slices' ;
1412import { resetChatAndReactions } from '@proton/meet/store/slices/chatAndReactionsSlice' ;
1513import { addKeyRotationLog } from '@proton/meet/store/slices/meetingInfo' ;
1614import { setMeetingLocked , toggleMeetingLockThunk } from '@proton/meet/store/slices/settings' ;
@@ -194,7 +192,7 @@ export const ProtonMeetContainer = ({ room, keyProvider, user = null }: ProtonMe
194192 const [ reconnectionFailed , setReconnectionFailed ] = useState ( false ) ;
195193 const [ mlsRetrying , setMlsRetrying ] = useState ( false ) ;
196194 // Stable ref to break the circular dependency between useConnectionHealthCheck and performFullReconnection
197- const triggerFullReconnectionRef = useRef < ( reason : RejoinReasonInfo ) => void > ( ( ) => { } ) ;
195+ const triggerFullReconnectionRef = useRef < ( reason : RejoinReasonInfo ) => void > ( ( ) => { } ) ;
198196 const [ prejoinParticipantCount , setPrejoinParticipantCount ] = useState < number | null > ( null ) ;
199197 const [ liveKitConnectionState , setLiveKitConnectionState ] = useState < ConnectionState | null > ( null ) ;
200198 const [ showReconnectedMessage , setShowReconnectedMessage ] = useState ( false ) ;
@@ -249,8 +247,6 @@ export const ProtonMeetContainer = ({ room, keyProvider, user = null }: ProtonMe
249247 [ getMeetingInfo ]
250248 ) ;
251249
252- const notifications = useNotifications ( ) ;
253-
254250 useIsRecordingInProgressReceiver ( wasmApp ) ;
255251
256252 const isGuestAdminRef = useRef ( false ) ;
@@ -322,10 +318,11 @@ export const ProtonMeetContainer = ({ room, keyProvider, user = null }: ProtonMe
322318 hasAnotherAdmin,
323319 } = isLocalParticipantAdmin ( participantsMap , room . localParticipant ) ;
324320
325- const shareLink = `${ window . location . origin } ${ meetingDetails . meetingId && meetingDetails . meetingPassword
326- ? getMeetingLink ( meetingDetails . meetingId , meetingDetails . meetingPassword )
327- : window . location . pathname
328- } `;
321+ const shareLink = `${ window . location . origin } ${
322+ meetingDetails . meetingId && meetingDetails . meetingPassword
323+ ? getMeetingLink ( meetingDetails . meetingId , meetingDetails . meetingPassword )
324+ : window . location . pathname
325+ } `;
329326
330327 // Check if joining own personal meeting room
331328 const isPersonalRoom = ! isGuest && personalMeeting ?. MeetingLinkName === token ;
@@ -424,12 +421,7 @@ export const ProtonMeetContainer = ({ room, keyProvider, user = null }: ProtonMe
424421 readyToDecrypt : true ,
425422 } ;
426423 } catch {
427- notifications . createNotification ( {
428- type : 'error' ,
429- text : c ( 'Error' ) . t `The meeting link you are trying to access does not exist or may have been deleted.` ,
430- expiration : 20000 ,
431- } ) ;
432-
424+ dispatch ( setInvalidMeetingLinkModalOpen ( true ) ) ;
433425 history . push ( '/dashboard' ) ;
434426
435427 return { } ;
0 commit comments