You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Use the first alias is there's no canonical alias
This commit is contained in:
@@ -33,6 +33,7 @@ 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');
|
||||
|
||||
@@ -538,7 +539,7 @@ module.exports = React.createClass({
|
||||
var presentedId = roomAlias || roomId;
|
||||
var room = MatrixClientPeg.get().getRoom(roomId);
|
||||
if (room) {
|
||||
var theAlias = room.getCanonicalAlias();
|
||||
var theAlias = MatrixTools.getDisplayAliasForRoom(room);
|
||||
if (theAlias) presentedId = theAlias;
|
||||
|
||||
// No need to do this given RoomView triggers it itself...
|
||||
@@ -630,7 +631,7 @@ module.exports = React.createClass({
|
||||
var presentedId = self.state.currentRoomId;
|
||||
var room = MatrixClientPeg.get().getRoom(self.state.currentRoomId);
|
||||
if (room) {
|
||||
var theAlias = room.getCanonicalAlias();
|
||||
var theAlias = MatrixTools.getDisplayAliasForRoom(room);
|
||||
if (theAlias) presentedId = theAlias;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user