mirror of https://github.com/vector-im/riot-web
Merge pull request #129 from matrix-org/dbkr/no_auto_join
Don't trigger joins from the room directory: always peekpull/21833/head
commit
9468ff63ff
|
@ -66,7 +66,6 @@ module.exports = React.createClass({
|
|||
collapse_rhs: false,
|
||||
ready: false,
|
||||
width: 10000,
|
||||
autoPeek: true, // by default, we peek into rooms when we try to join them
|
||||
};
|
||||
if (s.logged_in) {
|
||||
if (MatrixClientPeg.get().getRooms().length) {
|
||||
|
|
|
@ -60,6 +60,9 @@ 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,
|
||||
|
||||
// id of an event to jump to. If not given, will use the read-up-to-marker.
|
||||
|
@ -77,6 +80,12 @@ module.exports = React.createClass({
|
|||
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:
|
||||
*
|
||||
* eventNodes: a map from event id to DOM node representing that event
|
||||
|
@ -487,6 +496,7 @@ module.exports = React.createClass({
|
|||
this._updateTabCompleteList(this.state.room);
|
||||
|
||||
var room = MatrixClientPeg.get().getRoom(this.props.roomId);
|
||||
if (!room) return;
|
||||
var me = MatrixClientPeg.get().credentials.userId;
|
||||
if (this.state.joining && room.hasMembershipState(me, "join")) {
|
||||
this.setState({
|
||||
|
|
Loading…
Reference in New Issue