@@ -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