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:
parent
a511ad6633
commit
baa6d8a294
3 changed files with 19 additions and 7 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue