mirror of
https://github.com/vector-im/element-web.git
synced 2025-09-18 20:21:06 +02:00
Uncommit 71cb04c50ad1b76ac02d537cd096889ecdcc9f0a (I failed to branch)
This commit is contained in:
parent
71cb04c50a
commit
332354e5b6
@ -66,27 +66,9 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
showRoom: function(roomId) {
|
showRoom: function(roomId) {
|
||||||
var room;
|
|
||||||
for (var i = 0; i < this.state.publicRooms.length; ++i) {
|
|
||||||
if (this.state.publicRooms[i].room_id == roomId) {
|
|
||||||
room = this.state.publicRooms[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var oob_data = {};
|
|
||||||
if (room) {
|
|
||||||
oob_data = {
|
|
||||||
avatarUrl: room.avatar_url,
|
|
||||||
// XXX: This logic is duplicated from the JS SDK which
|
|
||||||
// would normally decide what the name is.
|
|
||||||
name: room.name || room.aliases[0],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: roomId,
|
room_id: roomId
|
||||||
oob_data: oob_data,
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user