Send the widgetId as part of all toWidget requests

Addresses part of https://github.com/vector-im/riot-web/issues/6708

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston 2018-05-12 13:49:43 -06:00
parent 1515ca11a8
commit 98da8b3575

View file

@ -44,6 +44,8 @@ export default class WidgetMessaging {
} }
messageToWidget(action) { messageToWidget(action) {
action.widgetId = this.widgetId; // Required to be sent for all outbound requests
return this.toWidget.exec(action, this.target).then((data) => { return this.toWidget.exec(action, this.target).then((data) => {
// Check for errors and reject if found // Check for errors and reject if found
if (data.response === undefined) { // null is valid if (data.response === undefined) { // null is valid