From 9d2bb70823945391406bd65f3b8e34eef9a55662 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 16 Feb 2017 17:03:22 +0000 Subject: [PATCH] If the home page is somehow accessed, goto directory For example, if someone ends up on /home somehow, just redirect to the directory instead of displaying a very awkward "File not found" plain text in the home page iFrame. --- src/components/structures/MatrixChat.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 72680a3eac..3265249105 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -464,6 +464,10 @@ module.exports = React.createClass({ this.notifyNewScreen('directory'); break; case 'view_home_page': + if (!this._teamToken) { + dis.dispatch({action: 'view_room_directory'}); + return; + } this._setPage(PageTypes.HomePage); this.notifyNewScreen('home'); break;