You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user