diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 9b37871ba9..8582b85d12 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -105,6 +105,8 @@ module.exports = React.createClass({ version: null, newVersion: null, + hasNewVersion: false, + newVersionReleaseNotes: null, // The username to default to when upgrading an account from a guest upgradeUsername: null, @@ -469,6 +471,12 @@ module.exports = React.createClass({ case 'load_completed': this._onLoadCompleted(); break; + case 'new_version': + this.onVersion( + payload.currentVersion, payload.newVersion, + payload.releaseNotes + ); + break; } }, @@ -961,11 +969,12 @@ module.exports = React.createClass({ this.showScreen("settings"); }, - onVersion: function(current, latest) { + onVersion: function(current, latest, releaseNotes) { this.setState({ version: current, newVersion: latest, - hasNewVersion: current !== latest + hasNewVersion: current !== latest, + newVersionReleaseNotes: releaseNotes, }); }, @@ -1100,7 +1109,9 @@ module.exports = React.createClass({ var topBar; if (this.state.hasNewVersion) { - topBar = ; + topBar = ; } else if (MatrixClientPeg.get().isGuest()) { topBar = ;