Show canonical alias in URL bar

Use https://github.com/matrix-org/matrix-js-sdk/pull/140 to get the canonical alias, because that's a thing now.
This commit is contained in:
David Baker 2016-06-17 15:17:45 +01:00
parent 624e34c48a
commit 3b5378fa53

View file

@ -33,7 +33,6 @@ var PostRegistration = require("./login/PostRegistration");
var Modal = require("../../Modal");
var Tinter = require("../../Tinter");
var sdk = require('../../index');
var MatrixTools = require('../../MatrixTools');
var linkifyMatrix = require("../../linkify-matrix");
var KeyCode = require('../../KeyCode');
@ -539,7 +538,7 @@ module.exports = React.createClass({
var presentedId = roomAlias || roomId;
var room = MatrixClientPeg.get().getRoom(roomId);
if (room) {
var theAlias = MatrixTools.getCanonicalAliasForRoom(room);
var theAlias = room.getCanonicalAlias();
if (theAlias) presentedId = theAlias;
// No need to do this given RoomView triggers it itself...
@ -631,7 +630,7 @@ module.exports = React.createClass({
var presentedId = self.state.currentRoomId;
var room = MatrixClientPeg.get().getRoom(self.state.currentRoomId);
if (room) {
var theAlias = MatrixTools.getCanonicalAliasForRoom(room);
var theAlias = room.getCanonicalAlias();
if (theAlias) presentedId = theAlias;
}