mirror of https://github.com/vector-im/riot-web
Merge pull request #5323 from matrix-org/travis/jitsi-popout-fix
Don't supply popout widgets with widget parameterspull/21833/head
commit
edcdd950f7
|
@ -161,17 +161,20 @@ export class StopGapWidget extends EventEmitter {
|
||||||
userHttpAvatarUrl: OwnProfileStore.instance.getHttpAvatarUrl(),
|
userHttpAvatarUrl: OwnProfileStore.instance.getHttpAvatarUrl(),
|
||||||
}, opts?.asPopout);
|
}, opts?.asPopout);
|
||||||
|
|
||||||
// Add in some legacy support sprinkles
|
const parsed = new URL(templated);
|
||||||
|
|
||||||
|
// Add in some legacy support sprinkles (for non-popout widgets)
|
||||||
// TODO: Replace these with proper widget params
|
// TODO: Replace these with proper widget params
|
||||||
// See https://github.com/matrix-org/matrix-doc/pull/1958/files#r405714833
|
// See https://github.com/matrix-org/matrix-doc/pull/1958/files#r405714833
|
||||||
const parsed = new URL(templated);
|
if (!opts?.asPopout) {
|
||||||
parsed.searchParams.set('widgetId', this.mockWidget.id);
|
parsed.searchParams.set('widgetId', this.mockWidget.id);
|
||||||
parsed.searchParams.set('parentUrl', window.location.href.split('#', 2)[0]);
|
parsed.searchParams.set('parentUrl', window.location.href.split('#', 2)[0]);
|
||||||
|
|
||||||
// Give the widget a scalar token if we're supposed to (more legacy)
|
// Give the widget a scalar token if we're supposed to (more legacy)
|
||||||
// TODO: Stop doing this
|
// TODO: Stop doing this
|
||||||
if (this.scalarToken) {
|
if (this.scalarToken) {
|
||||||
parsed.searchParams.set('scalar_token', this.scalarToken);
|
parsed.searchParams.set('scalar_token', this.scalarToken);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace the encoded dollar signs back to dollar signs. They have no special meaning
|
// Replace the encoded dollar signs back to dollar signs. They have no special meaning
|
||||||
|
|
Loading…
Reference in New Issue