diff --git a/src/CallHandler.js b/src/CallHandler.js index 3efd800499..bcdf7853fd 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -205,7 +205,7 @@ function _setCallListeners(call) { function _setCallState(call, roomId, status) { console.log( - "Call state in %s changed to %s (%s)", roomId, status, (call ? call.call_state : "-"), + `Call state in ${roomId} changed to ${status} (${call ? call.call_state : "-"})`, ); calls[roomId] = call; diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index cfb75f9a48..260b63dfd4 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -190,9 +190,20 @@ export default class AppTile extends React.Component { // TODO: Pick the right manager for the widget + const defaultManager = managers.getPrimaryManager(); + if (!WidgetUtils.isScalarUrl(defaultManager.apiUrl)) { + console.warn('Non-scalar manager, not setting scalar token!', url); + this.setState({ + error: null, + widgetUrl: this._addWurlParams(this.props.url), + initialising: false, + }); + return; + } + // Fetch the token before loading the iframe as we need it to mangle the URL if (!this._scalarClient) { - this._scalarClient = managers.getPrimaryManager().getScalarClient(); + this._scalarClient = defaultManager.getScalarClient(); } this._scalarClient.getScalarToken().done((token) => { // Append scalar_token as a query param if not already present diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 6af2860399..ca83dd1814 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -495,6 +495,12 @@ module.exports = createReactClass({ return null; } const eventId = this.props.mxEvent.getId(); + if (!eventId) { + // XXX: Temporary diagnostic logging for https://github.com/vector-im/riot-web/issues/11120 + console.error("EventTile attempted to get relations for an event without an ID"); + // Use event's special `toJSON` method to log key data. + console.log(JSON.stringify(this.props.mxEvent, null, 4)); + } return this.props.getRelationsForEvent(eventId, "m.annotation", "m.reaction"); }, diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 1398e03b10..dc893f0049 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -389,6 +389,8 @@ module.exports = createReactClass({ ariaLabel += " " + _t("%(count)s unread messages.", { count: notificationCount }); } else if (mentionBadges && !isInvite) { ariaLabel += " " + _t("Unread mentions."); + } else if (this.props.unread) { + ariaLabel += " " + _t("Unread messages."); } return