From 92824411e82015d1d2e81ccba3af70002cc48522 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 May 2020 12:33:10 +0100 Subject: [PATCH] Fix persistent widgets on desktop / http WidgetMessaging needs the URL of the widget that gets rendered into the iframe because that's where the postmessages will be coming from. Fixes https://github.com/vector-im/riot-web/issues/13369 --- src/components/views/elements/AppTile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 6a5dfc97e0..ae5fe9a35c 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -430,7 +430,7 @@ export default class AppTile extends React.Component { // is used for is to determine the origin we're talking to, and therefore we don't need the // fully templated URL. const widgetMessaging = new WidgetMessaging( - this.props.app.id, this.props.app.url, this.props.userWidget, this._appFrame.current.contentWindow); + this.props.app.id, this._getRenderedUrl(), this.props.userWidget, this._appFrame.current.contentWindow); ActiveWidgetStore.setWidgetMessaging(this.props.app.id, widgetMessaging); widgetMessaging.getCapabilities().then((requestedCapabilities) => { console.log(`Widget ${this.props.app.id} requested capabilities: ` + requestedCapabilities);