Regression: Add token to Jitsi call on iOS (#4863)

* add token to jitsi builder

* fix room

* fix room and remove flags

* fix video prop
This commit is contained in:
Gleidson Daniel Silva 2023-01-30 13:56:39 -03:00 committed by Diego Mello
parent 97029e8840
commit 06e49ed7e6
1 changed files with 5 additions and 12 deletions

View File

@ -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);