diff --git a/skins/base/views/molecules/RoomHeader.js b/skins/base/views/molecules/RoomHeader.js index 62f2448456..33d43302c3 100644 --- a/skins/base/views/molecules/RoomHeader.js +++ b/skins/base/views/molecules/RoomHeader.js @@ -17,14 +17,20 @@ limitations under the License. 'use strict'; var React = require('react'); +var ComponentBroker = require('../../../../src/ComponentBroker'); var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); var RoomHeaderController = require("../../../../src/controllers/molecules/RoomHeader"); +var EditableText = ComponentBroker.get("atoms/EditableText"); module.exports = React.createClass({ displayName: 'RoomHeader', mixins: [RoomHeaderController], + onNameChange: function(new_name) { + MatrixClientPeg.get().setRoomName(this.props.room.roomId, new_name); + }, + render: function() { var topic = this.props.room.currentState.getStateEvents('m.room.topic', ''); @@ -52,7 +58,9 @@ module.exports = React.createClass({