From ba0a9c8439096193d2678731e7d3c4bcdb76d145 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 1 Apr 2020 13:59:48 -0600 Subject: [PATCH] Use console.log in place of console.warn for less warnings These aren't react warnings, but they are distracting in the logs. --- src/FromWidgetPostMessageApi.js | 2 +- src/WidgetMessaging.js | 6 +++--- src/components/views/elements/AppTile.js | 4 ++-- src/components/views/rooms/Stickerpicker.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/FromWidgetPostMessageApi.js b/src/FromWidgetPostMessageApi.js index 3c4494c09d..c7d1714b69 100644 --- a/src/FromWidgetPostMessageApi.js +++ b/src/FromWidgetPostMessageApi.js @@ -165,7 +165,7 @@ export default class FromWidgetPostMessageApi { const action = event.data.action; const widgetId = event.data.widgetId; if (action === 'content_loaded') { - console.warn('Widget reported content loaded for', widgetId); + console.log('Widget reported content loaded for', widgetId); dis.dispatch({ action: 'widget_content_loaded', widgetId: widgetId, diff --git a/src/WidgetMessaging.js b/src/WidgetMessaging.js index 30c2389b1e..5f877bd48a 100644 --- a/src/WidgetMessaging.js +++ b/src/WidgetMessaging.js @@ -92,7 +92,7 @@ export default class WidgetMessaging { * @return {Promise} To be resolved with screenshot data when it has been generated */ getScreenshot() { - console.warn('Requesting screenshot for', this.widgetId); + console.log('Requesting screenshot for', this.widgetId); return this.messageToWidget({ api: OUTBOUND_API_NAME, action: "screenshot", @@ -106,12 +106,12 @@ export default class WidgetMessaging { * @return {Promise} To be resolved with an array of requested widget capabilities */ getCapabilities() { - console.warn('Requesting capabilities for', this.widgetId); + console.log('Requesting capabilities for', this.widgetId); return this.messageToWidget({ api: OUTBOUND_API_NAME, action: "capabilities", }).then((response) => { - console.warn('Got capabilities for', this.widgetId, response.capabilities); + console.log('Got capabilities for', this.widgetId, response.capabilities); return response.capabilities; }); } diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index db738664c8..8940a175e9 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -319,7 +319,7 @@ export default class AppTile extends React.Component { } _onSnapshotClick() { - console.warn("Requesting widget snapshot"); + console.log("Requesting widget snapshot"); ActiveWidgetStore.getWidgetMessaging(this.props.app.id).getScreenshot() .catch((err) => { console.error("Failed to get screenshot", err); @@ -423,7 +423,7 @@ export default class AppTile extends React.Component { }, this.props.whitelistCapabilities); if (requestedWhitelistCapabilies.length > 0 ) { - console.warn(`Widget ${this.props.app.id} allowing requested, whitelisted properties: ` + + console.log(`Widget ${this.props.app.id} allowing requested, whitelisted properties: ` + requestedWhitelistCapabilies, ); } diff --git a/src/components/views/rooms/Stickerpicker.js b/src/components/views/rooms/Stickerpicker.js index da5f129a42..3af9ff4f65 100644 --- a/src/components/views/rooms/Stickerpicker.js +++ b/src/components/views/rooms/Stickerpicker.js @@ -84,11 +84,11 @@ export default class Stickerpicker extends React.Component { async _removeStickerpickerWidgets() { const scalarClient = await this._acquireScalarClient(); - console.warn('Removing Stickerpicker widgets'); + console.log('Removing Stickerpicker widgets'); if (this.state.widgetId) { if (scalarClient) { scalarClient.disableWidgetAssets(widgetType, this.state.widgetId).then(() => { - console.warn('Assets disabled'); + console.log('Assets disabled'); }).catch((err) => { console.error('Failed to disable assets'); });