1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Use randomly generated conference names for Jitsi

Fixes https://github.com/vector-im/element-web/issues/15205
Replaces https://github.com/matrix-org/matrix-react-sdk/pull/5322

This change uses a random ID for the Jitsi conference name to avoid any badly-named Jitsi calls, and overrides the "subject" (title) of the call so end users aren't typically exposed to the random ID.
This commit is contained in:
Travis Ralston
2021-02-15 08:53:37 -07:00
parent 55d042596d
commit cd82d97c3e
5 changed files with 4 additions and 45 deletions

View File

@@ -64,7 +64,6 @@ import dis from './dispatcher/dispatcher';
import WidgetUtils from './utils/WidgetUtils';
import WidgetEchoStore from './stores/WidgetEchoStore';
import SettingsStore from './settings/SettingsStore';
import {generateHumanReadableId} from "./utils/NamingUtils";
import {Jitsi} from "./widgets/Jitsi";
import {WidgetType} from "./widgets/WidgetType";
import {SettingLevel} from "./settings/SettingLevel";
@@ -86,6 +85,7 @@ import DesktopCapturerSourcePicker from "./components/views/elements/DesktopCapt
import { Action } from './dispatcher/actions';
import { roomForVirtualRoom, getOrCreateVirtualRoomForRoom } from './VoipUserMapper';
import { addManagedHybridWidget, isManagedHybridWidgetEnabled } from './widgets/ManagedHybrid';
import { randomString } from "matrix-js-sdk/lib/randomstring";
const CHECK_PSTN_SUPPORT_ATTEMPTS = 3;
@@ -780,7 +780,7 @@ export default class CallHandler {
confId = base32.stringify(Buffer.from(roomId), { pad: false });
} else {
// Create a random human readable conference ID
confId = `JitsiConference${generateHumanReadableId()}`;
confId = `JitsiConference${randomString(32)}`;
}
let widgetUrl = WidgetUtils.getLocalJitsiWrapperUrl({auth: jitsiAuth});
@@ -796,6 +796,7 @@ export default class CallHandler {
isAudioOnly: type === 'voice',
domain: jitsiDomain,
auth: jitsiAuth,
roomName: room.name,
};
const widgetId = (