diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index e2f5c24b37..5869c8ef33 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -316,9 +316,6 @@ module.exports = React.createClass({ }); break; case 'view_room': - // by default we autoPeek rooms, unless we were called explicitly with - // autoPeek=false by something like RoomDirectory who has already peeked - this.setState({ autoPeek : payload.auto_peek === false ? false : true }); this._viewRoom(payload.room_id, payload.show_settings, payload.event_id); break; case 'view_prev_room': @@ -880,7 +877,6 @@ module.exports = React.createClass({ eventId={this.state.initialEventId} highlightedEventId={this.state.highlightedEventId} eventPixelOffset={this.state.initialEventPixelOffset} - autoPeek={this.state.autoPeek} key={this.state.currentRoom} ConferenceHandler={this.props.ConferenceHandler} /> ); diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 820aaf407a..a72ee07e24 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -60,8 +60,6 @@ module.exports = React.createClass({ displayName: 'RoomView', propTypes: { ConferenceHandler: React.PropTypes.any, - roomId: React.PropTypes.string, - autoPeek: React.PropTypes.bool, // Now unused, left here temporarily to avoid merge conflicts with @richvdh's branch. roomId: React.PropTypes.string.isRequired, @@ -76,14 +74,6 @@ module.exports = React.createClass({ // ID of an event to highlight. If undefined, no event will be highlighted. // Typically this will either be the same as 'eventId', or undefined. highlightedEventId: React.PropTypes.string, - - autoPeek: React.PropTypes.bool, // should we try to peek the room on mount, or has whoever invoked us already initiated a peek? - }, - - getDefaultProps: function() { - return { - autoPeek: true, - } }, /* properties in RoomView objects include: @@ -155,11 +145,6 @@ module.exports = React.createClass({ // We can /peek though. If it fails then we present the join UI. If it // succeeds then great, show the preview (but we still may be able to /join!). if (!this.state.room) { - if (!this.props.autoPeek) { - console.log("No room loaded, and autopeek disabled"); - return; - } - console.log("Attempting to peek into room %s", this.props.roomId); roomProm = MatrixClientPeg.get().peekInRoom(this.props.roomId).then((room) => {