Compare commits

...

2 Commits

Author SHA1 Message Date
Дамян Минков
77c6a1070f feat: Fix luajwtjitsi deependencies.
As luajwtjitsi is in jitsi-meet-prosody move its dependencies.
2022-06-06 09:57:19 -05:00
Дамян Минков
28ef20589b fix: When adding a room param to urls check for previous params. 2022-05-31 16:05:43 -05:00
6 changed files with 26 additions and 14 deletions

View File

@@ -17,6 +17,7 @@ import {
JitsiConnectionEvents
} from './react/features/base/lib-jitsi-meet';
import { isFatalJitsiConnectionError } from './react/features/base/lib-jitsi-meet/functions';
import { appendURLParam } from './react/features/base/util';
import { getCustomerDetails } from './react/features/jaas/actions.any';
import { isVpaasMeeting, getJaasJWT } from './react/features/jaas/functions';
import { setPrejoinDisplayNameRequired } from './react/features/prejoin/actions';
@@ -102,14 +103,11 @@ export async function connect(id, password, roomName) {
// Use Websocket URL for the web app if configured. Note that there is no 'isWeb' check, because there's assumption
// that this code executes only on web browsers/electron. This needs to be changed when mobile and web are unified.
let serviceUrl = connectionConfig.websocket || connectionConfig.bosh;
serviceUrl += `?room=${roomName}`;
connectionConfig.serviceUrl = serviceUrl;
connectionConfig.serviceUrl = appendURLParam(connectionConfig.websocket || connectionConfig.bosh, 'room', roomName);
if (connectionConfig.websocketKeepAliveUrl) {
connectionConfig.websocketKeepAliveUrl += `?room=${roomName}`;
connectionConfig.websocketKeepAliveUrl
= appendURLParam(connectionConfig.websocketKeepAliveUrl, 'room', roomName);
}
const connection = new JitsiMeetJS.JitsiConnection(null, jwt, connectionConfig);

4
debian/control vendored
View File

@@ -33,7 +33,7 @@ Description: Configuration for web serving of Jitsi Meet
Package: jitsi-meet-prosody
Architecture: all
Depends: openssl, prosody (>= 0.11.0) | prosody-trunk | prosody-0.12 | prosody-0.11, lua-sec
Depends: openssl, prosody (>= 0.11.0) | prosody-trunk | prosody-0.12 | prosody-0.11, lua-sec, lua-basexx, lua-luaossl, lua-cjson
Replaces: jitsi-meet-tokens
Description: Prosody configuration for Jitsi Meet
Jitsi Meet is a WebRTC JavaScript application that uses Jitsi
@@ -47,7 +47,7 @@ Description: Prosody configuration for Jitsi Meet
Package: jitsi-meet-tokens
Architecture: all
Depends: ${misc:Depends}, prosody-trunk | prosody-0.11 | prosody-0.12 | prosody (>= 0.11.2), jitsi-meet-prosody, lua-basexx, lua-luaossl, lua-cjson
Depends: ${misc:Depends}, prosody-trunk | prosody-0.11 | prosody-0.12 | prosody (>= 0.11.2), jitsi-meet-prosody
Description: Prosody token authentication plugin for Jitsi Meet
Package: jitsi-meet-turnserver

View File

@@ -138,11 +138,11 @@ Component "lobby.jitmeet.example.com" "muc"
"polls";
}
-- Enabled dial-in for JaaS customers
-- Enables dial-in for Jitsi meet components customers
-- Note: make sure you have the following packages installed: lua-basexx, liblua5.3-dev, libssl-dev, luarocks
-- and execute $ sudo luarocks install luajwtjitsi 3.0-0
VirtualHost "jigasi.meet.jitsi"
enabled = false -- JaaS customers remove this line
enabled = false -- Jitsi meet components customers remove this line
modules_enabled = {
"ping";
"bosh";

View File

@@ -7,6 +7,7 @@ import { conferenceLeft, conferenceWillLeave } from '../conference/actions';
import { getCurrentConference } from '../conference/functions';
import JitsiMeetJS, { JitsiConnectionEvents } from '../lib-jitsi-meet';
import {
appendURLParam,
getBackendSafeRoomName,
parseURIString
} from '../util';
@@ -315,10 +316,10 @@ function _constructOptions(state) {
if (serviceUrl && room) {
const roomName = getBackendSafeRoomName(room);
options.serviceUrl = `${serviceUrl}?room=${roomName}`;
options.serviceUrl = appendURLParam(serviceUrl, 'room', roomName);
if (options.websocketKeepAliveUrl) {
options.websocketKeepAliveUrl += `?room=${roomName}`;
options.websocketKeepAliveUrl = appendURLParam(options.websocketKeepAliveUrl, 'room', roomName);
}
}

View File

@@ -603,3 +603,16 @@ export function addHashParamsToURL(url: URL, hashParamsToAdd: Object = {}) {
export function getDecodedURI(uri: string) {
return decodeURI(uri.replace(/^https?:\/\//i, ''));
}
/**
* Adds new param to a url string. Checks whether to use '?' or '&' as a separator (checks for already existing params).
*
* @param {string} url - The url to modify.
* @param {string} name - The param name to add.
* @param {string} value - The value for the param.
*
* @returns {string} - The modified url.
*/
export function appendURLParam(url: string, name: string, value: string) {
return `${url}${url.includes('?') ? '&' : '?'}${name}=${value}`;
}

View File

@@ -8,7 +8,7 @@ import { i18next } from '../base/i18n';
import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';
import { getLocalParticipant, isLocalParticipantModerator } from '../base/participants';
import { toState } from '../base/redux';
import { parseURIString } from '../base/util';
import { appendURLParam, parseURIString } from '../base/util';
import { isVpaasMeeting } from '../jaas/functions';
import { getDialInConferenceID, getDialInNumbers } from './_utils';
@@ -596,7 +596,7 @@ export function getDialInfoPageURL(state: Object, roomName: ?string) {
const url = didPageUrl || `${href.substring(0, href.lastIndexOf('/'))}/${DIAL_IN_INFO_PAGE_PATH_NAME}`;
return `${url}?room=${room}`;
return appendURLParam(url, 'room', room);
}
/**