diff --git a/src/skins/vector/views/molecules/RoomTile.js b/src/skins/vector/views/molecules/RoomTile.js index 28e76a703..538a7bd93 100644 --- a/src/skins/vector/views/molecules/RoomTile.js +++ b/src/skins/vector/views/molecules/RoomTile.js @@ -236,7 +236,8 @@ var RoomTile = React.createClass({ name = this.props.room.getMember(myUserId).events.member.getSender(); } else { - name = this.props.room.name; + // XXX: We should never display raw room IDs, but sometimes the room name js sdk gives is undefined + name = this.props.room.name || this.props.room.roomId; } name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon diff --git a/src/vector/index.js b/src/vector/index.js index 298861973..45d69001b 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -65,14 +65,21 @@ function parseQsFromFragment(location) { return {}; } +function parseQs(location) { + return qs.parse(location.search.substring(1)); +} + // Here, we do some crude URL analysis to allow // deep-linking. We only support registration // deep-links in this example. function routeUrl(location) { - if (location.hash.indexOf('#/register') == 0) { + var params = parseQs(location); + var loginToken = params.loginToken; + if (loginToken) { + window.matrixChat.showScreen('token_login', parseQs(location)); + } + else if (location.hash.indexOf('#/register') == 0) { window.matrixChat.showScreen('register', parseQsFromFragment(location)); - } else if (location.hash.indexOf('#/login/cas') == 0) { - window.matrixChat.showScreen('cas_login', parseQsFromFragment(location)); } else { window.matrixChat.showScreen(location.hash.substring(2)); } diff --git a/vector/index.html b/vector/index.html index d893523ee..d86466797 100644 --- a/vector/index.html +++ b/vector/index.html @@ -4,26 +4,26 @@ Vector - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + +