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:
Jason Robinson 2020-09-04 12:42:46 +03:00
parent a511ad6633
commit baa6d8a294
3 changed files with 19 additions and 7 deletions

View file

@ -603,6 +603,7 @@ export default class AppTile extends React.Component {
// TODO: Namespace themes through some standard
'theme': SettingsStore.getValue("theme"),
});
console.log("DEBUG TEMPLATEDURL APPTILE", vars);
if (vars.conferenceId === undefined) {
// we'll need to parse the conference ID out of the URL for v1 Jitsi widgets
@ -626,7 +627,10 @@ export default class AppTile extends React.Component {
if (WidgetType.JITSI.matches(this.props.app.type)) {
console.log("Replacing Jitsi widget URL with local wrapper");
url = WidgetUtils.getLocalJitsiWrapperUrl({forLocalRender: true});
url = WidgetUtils.getLocalJitsiWrapperUrl({
forLocalRender: true,
auth: this.props.app.data ? this.props.app.data.auth : null,
});
url = this._addWurlParams(url);
} else {
url = this._getSafeUrl(this.state.widgetUrl);
@ -637,7 +641,10 @@ export default class AppTile extends React.Component {
_getPopoutUrl() {
if (WidgetType.JITSI.matches(this.props.app.type)) {
return this._templatedUrl(
WidgetUtils.getLocalJitsiWrapperUrl({forLocalRender: false}),
WidgetUtils.getLocalJitsiWrapperUrl({
forLocalRender: false,
auth: this.props.app.data ? this.props.app.data.auth : null,
}),
this.props.app.type,
);
} else {