stop avatar mxids being copy-pastable (unless they contain an initial). should significantly improve https://github.com/vector-im/vector-web/issues/893
parent
0598092f9d
commit
005ebbd037
|
@ -325,7 +325,7 @@ module.exports = React.createClass({
|
||||||
break;
|
break;
|
||||||
case 'view_room':
|
case 'view_room':
|
||||||
this._viewRoom(
|
this._viewRoom(
|
||||||
payload.room_id, payload.show_settings, payload.event_id,
|
payload.room_id, payload.room_alias, payload.show_settings, payload.event_id,
|
||||||
payload.invite_sign_url, payload.oob_data
|
payload.invite_sign_url, payload.oob_data
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
@ -371,6 +371,7 @@ module.exports = React.createClass({
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: foundRoom.roomId,
|
room_id: foundRoom.roomId,
|
||||||
|
room_alias: payload.room_alias,
|
||||||
event_id: payload.event_id,
|
event_id: payload.event_id,
|
||||||
invite_sign_url: payload.invite_sign_url,
|
invite_sign_url: payload.invite_sign_url,
|
||||||
oob_data: payload.oob_data,
|
oob_data: payload.oob_data,
|
||||||
|
@ -383,6 +384,7 @@ module.exports = React.createClass({
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: result.room_id,
|
room_id: result.room_id,
|
||||||
|
room_alias: payload.room_alias,
|
||||||
event_id: payload.event_id,
|
event_id: payload.event_id,
|
||||||
invite_sign_url: payload.invite_sign_url,
|
invite_sign_url: payload.invite_sign_url,
|
||||||
oob_data: payload.oob_data,
|
oob_data: payload.oob_data,
|
||||||
|
@ -476,7 +478,7 @@ module.exports = React.createClass({
|
||||||
// @param {Object} oob_data Object of additional data about the room
|
// @param {Object} oob_data Object of additional data about the room
|
||||||
// that has been passed out-of-band (eg.
|
// that has been passed out-of-band (eg.
|
||||||
// room name and avatar from an invite email)
|
// room name and avatar from an invite email)
|
||||||
_viewRoom: function(roomId, showSettings, eventId, invite_sign_url, oob_data) {
|
_viewRoom: function(roomId, roomAlias, showSettings, eventId, invite_sign_url, oob_data) {
|
||||||
// before we switch room, record the scroll state of the current room
|
// before we switch room, record the scroll state of the current room
|
||||||
this._updateScrollMap();
|
this._updateScrollMap();
|
||||||
|
|
||||||
|
@ -508,7 +510,7 @@ module.exports = React.createClass({
|
||||||
// the new screen yet (we won't be showing it yet)
|
// the new screen yet (we won't be showing it yet)
|
||||||
// The normal case where this happens is navigating
|
// The normal case where this happens is navigating
|
||||||
// to the room in the URL bar on page load.
|
// to the room in the URL bar on page load.
|
||||||
var presentedId = 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 = MatrixTools.getCanonicalAliasForRoom(room);
|
||||||
|
|
|
@ -126,7 +126,7 @@ module.exports = React.createClass({
|
||||||
{ initialLetter }
|
{ initialLetter }
|
||||||
</span>
|
</span>
|
||||||
<img className="mx_BaseAvatar_image" src={imageUrl}
|
<img className="mx_BaseAvatar_image" src={imageUrl}
|
||||||
title={this.props.title} onError={this.onError}
|
alt="" title={this.props.title} onError={this.onError}
|
||||||
width={this.props.width} height={this.props.height} />
|
width={this.props.width} height={this.props.height} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -135,7 +135,7 @@ module.exports = React.createClass({
|
||||||
<img className="mx_BaseAvatar mx_BaseAvatar_image" src={imageUrl}
|
<img className="mx_BaseAvatar mx_BaseAvatar_image" src={imageUrl}
|
||||||
onError={this.onError}
|
onError={this.onError}
|
||||||
width={this.props.width} height={this.props.height}
|
width={this.props.width} height={this.props.height}
|
||||||
title={this.props.title}
|
title={this.props.title} alt=""
|
||||||
{...this.props} />
|
{...this.props} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue