From 566fb2caebc604c90c3073a97482fa6873043e7b Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 7 Jun 2017 22:41:02 +0100 Subject: [PATCH] Add some logging around switching rooms ... which I wish had been there when I was staring at a rageshake. --- src/components/structures/MatrixChat.js | 11 +++++++++++ src/components/structures/TimelinePanel.js | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index efb2b38d6e..d11e100f26 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -644,6 +644,17 @@ module.exports = React.createClass({ } } + if (roomInfo.room_alias) { + console.log( + `Switching to room alias ${roomInfo.room_alias} at event ` + + newState.initialEventId, + ); + } else { + console.log(`Switching to room id ${roomInfo.room_id} at event ` + + newState.initialEventId, + ); + } + // Wait for the first sync to complete so that if a room does have an alias, // it would have been retrieved. let waitFor = q(null); diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index f0e6810b6b..928e2405aa 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -902,6 +902,9 @@ var TimelinePanel = React.createClass({ var onError = (error) => { this.setState({timelineLoading: false}); + console.error( + `Error loading timeline panel at ${eventId}: ${error}`, + ); var msg = error.message ? error.message : JSON.stringify(error); var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");