mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-03 15:44:58 +00:00
Make room changing work
This commit is contained in:
@@ -11,6 +11,12 @@ module.exports = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
componentWillReceiveProps: function(props) {
|
||||
this.setState({
|
||||
room: MatrixClientPeg.get().getRoom(props.room_id)
|
||||
});
|
||||
},
|
||||
|
||||
getMessageTiles: function() {
|
||||
return this.state.room.timeline.map(function(mxEv) {
|
||||
return (
|
||||
|
||||
@@ -39,6 +39,11 @@ module.exports = React.createClass({
|
||||
ready: false
|
||||
});
|
||||
break;
|
||||
case 'view_room':
|
||||
this.setState({
|
||||
currentRoom: payload.room_id
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user