Switch to new view_room

This commit is contained in:
David Baker 2016-06-10 15:13:41 +01:00
parent a030e46c69
commit d7504aeda5

View file

@ -116,21 +116,16 @@ module.exports = React.createClass({
}; };
} }
var payload = {
oob_data: oob_data,
};
if (roomAlias) {
payload.action = 'view_room_alias';
payload.room_alias = roomAlias;
} else {
// It's not really possible to join Matrix rooms by ID because the HS has no way to know // It's not really possible to join Matrix rooms by ID because the HS has no way to know
// which servers to start querying. However, there's no other way to join rooms in // which servers to start querying. However, there's no other way to join rooms in
// this list without aliases at present. // this list without aliases at present, so if roomAlias isn't set here we'll rely
payload.action = 'view_room'; // on view_room falling back to using the ID
payload.room_id = roomId; dis.dispatch({
} oob_data: oob_data,
action: 'view_room',
dis.dispatch(payload); room_id: roomId,
room_alias: roomAlias,
});
}, },
getRows: function(filter) { getRows: function(filter) {