mirror of https://github.com/vector-im/riot-web
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.pull/21833/head
parent
624e34c48a
commit
3b5378fa53
|
@ -33,7 +33,6 @@ var PostRegistration = require("./login/PostRegistration");
|
||||||
var Modal = require("../../Modal");
|
var Modal = require("../../Modal");
|
||||||
var Tinter = require("../../Tinter");
|
var Tinter = require("../../Tinter");
|
||||||
var sdk = require('../../index');
|
var sdk = require('../../index');
|
||||||
var MatrixTools = require('../../MatrixTools');
|
|
||||||
var linkifyMatrix = require("../../linkify-matrix");
|
var linkifyMatrix = require("../../linkify-matrix");
|
||||||
var KeyCode = require('../../KeyCode');
|
var KeyCode = require('../../KeyCode');
|
||||||
|
|
||||||
|
@ -539,7 +538,7 @@ module.exports = React.createClass({
|
||||||
var presentedId = roomAlias || roomId;
|
var presentedId = roomAlias || roomId;
|
||||||
var room = MatrixClientPeg.get().getRoom(roomId);
|
var room = MatrixClientPeg.get().getRoom(roomId);
|
||||||
if (room) {
|
if (room) {
|
||||||
var theAlias = MatrixTools.getCanonicalAliasForRoom(room);
|
var theAlias = room.getCanonicalAlias();
|
||||||
if (theAlias) presentedId = theAlias;
|
if (theAlias) presentedId = theAlias;
|
||||||
|
|
||||||
// No need to do this given RoomView triggers it itself...
|
// No need to do this given RoomView triggers it itself...
|
||||||
|
@ -631,7 +630,7 @@ module.exports = React.createClass({
|
||||||
var presentedId = self.state.currentRoomId;
|
var presentedId = self.state.currentRoomId;
|
||||||
var room = MatrixClientPeg.get().getRoom(self.state.currentRoomId);
|
var room = MatrixClientPeg.get().getRoom(self.state.currentRoomId);
|
||||||
if (room) {
|
if (room) {
|
||||||
var theAlias = MatrixTools.getCanonicalAliasForRoom(room);
|
var theAlias = room.getCanonicalAlias();
|
||||||
if (theAlias) presentedId = theAlias;
|
if (theAlias) presentedId = theAlias;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue