You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Correctly template in Jitsi widget auth if such exists
Also add roomId to the widget data and URL template. It's needed by the Element Web Jitsi code to produce auth for the Jitsi backend.
This commit is contained in:
@@ -448,16 +448,21 @@ export default class WidgetUtils {
|
||||
return encodeURIComponent(`${widgetLocation}::${widgetUrl}`);
|
||||
}
|
||||
|
||||
static getLocalJitsiWrapperUrl(opts: {forLocalRender?: boolean}={}) {
|
||||
static getLocalJitsiWrapperUrl(opts: {forLocalRender?: boolean, auth?: string}={}) {
|
||||
// NB. we can't just encodeURIComponent all of these because the $ signs need to be there
|
||||
const queryString = [
|
||||
const queryParts = [
|
||||
'conferenceDomain=$domain',
|
||||
'conferenceId=$conferenceId',
|
||||
'isAudioOnly=$isAudioOnly',
|
||||
'displayName=$matrix_display_name',
|
||||
'avatarUrl=$matrix_avatar_url',
|
||||
'userId=$matrix_user_id',
|
||||
].join('&');
|
||||
'roomId=$matrix_room_id',
|
||||
];
|
||||
if (opts.auth) {
|
||||
queryParts.push(`auth=${opts.auth}`);
|
||||
}
|
||||
const queryString = queryParts.join('&');
|
||||
|
||||
let baseUrl = window.location;
|
||||
if (window.location.protocol !== "https:" && !opts.forLocalRender) {
|
||||
|
||||
Reference in New Issue
Block a user