From 18cc16beb79bfa1732212e01bc4f940a8d266f8a Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Silva Date: Mon, 30 Jan 2023 13:56:39 -0300 Subject: [PATCH] Regression: Add token to Jitsi call on iOS (#4863) * add token to jitsi builder * fix room * fix room and remove flags * fix video prop --- app/views/JitsiMeetView.ios.tsx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/app/views/JitsiMeetView.ios.tsx b/app/views/JitsiMeetView.ios.tsx index a9eeae1ad..effbe2331 100644 --- a/app/views/JitsiMeetView.ios.tsx +++ b/app/views/JitsiMeetView.ios.tsx @@ -38,8 +38,8 @@ const JitsiMeetView = (): React.ReactElement => { const regex = /(?:\/.*\/)(.*)/; const urlWithoutServer = regex.exec(url)![1]; const serverUrl = url.replace(`/${urlWithoutServer}`, ''); - const room = urlWithoutServer.split('#')[0]; - + const room = (url.includes('jwt=') ? urlWithoutServer.split('jwt=')[0] : urlWithoutServer.split('#')[0]).replace('?', ''); + const jwtToken = url.includes('jwt=') ? url.substring(url.indexOf('jwt=') + 4, url.lastIndexOf('#config')) : undefined; const conferenceOptions = { room, serverUrl, @@ -51,19 +51,12 @@ const JitsiMeetView = (): React.ReactElement => { audioOnly, audioMuted: false, videoMuted: audioOnly, + token: jwtToken, featureFlags: { - 'live-streaming.enabled': false, - 'calendar.enabled': false, - 'call-integration.enabled': false, - 'pip.enabled': false, - 'invite.enabled': false, - 'welcomepage.enabled': false, - 'add-people.enabled': false + 'calendar.enabled': false }, configOverrides: { - 'breakoutRooms.hideAddRoomButton': false, - 'breakoutRooms.hideAutoAssignButton': false, - 'breakoutRooms.hideJoinRoomButton': false + 'breakoutRooms.hideAddRoomButton': false } }; logEvent(videoConf ? events.LIVECHAT_VIDEOCONF_JOIN : events.JM_CONFERENCE_JOIN);