Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit edcdd95

Browse files
authored
Merge pull request #5323 from matrix-org/travis/jitsi-popout-fix
Don't supply popout widgets with widget parameters
2 parents ef90562 + 3a88b26 commit edcdd95

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/stores/widgets/StopGapWidget.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,20 @@ export class StopGapWidget extends EventEmitter {
161161
userHttpAvatarUrl: OwnProfileStore.instance.getHttpAvatarUrl(),
162162
}, opts?.asPopout);
163163

164-
// Add in some legacy support sprinkles
165-
// TODO: Replace these with proper widget params
166-
// See https://github.com/matrix-org/matrix-doc/pull/1958/files#r405714833
167164
const parsed = new URL(templated);
168-
parsed.searchParams.set('widgetId', this.mockWidget.id);
169-
parsed.searchParams.set('parentUrl', window.location.href.split('#', 2)[0]);
170165

171-
// Give the widget a scalar token if we're supposed to (more legacy)
172-
// TODO: Stop doing this
173-
if (this.scalarToken) {
174-
parsed.searchParams.set('scalar_token', this.scalarToken);
166+
// Add in some legacy support sprinkles (for non-popout widgets)
167+
// TODO: Replace these with proper widget params
168+
// See https://github.com/matrix-org/matrix-doc/pull/1958/files#r405714833
169+
if (!opts?.asPopout) {
170+
parsed.searchParams.set('widgetId', this.mockWidget.id);
171+
parsed.searchParams.set('parentUrl', window.location.href.split('#', 2)[0]);
172+
173+
// Give the widget a scalar token if we're supposed to (more legacy)
174+
// TODO: Stop doing this
175+
if (this.scalarToken) {
176+
parsed.searchParams.set('scalar_token', this.scalarToken);
177+
}
175178
}
176179

177180
// Replace the encoded dollar signs back to dollar signs. They have no special meaning

0 commit comments

Comments
 (0)