Merge pull request #1032 from matrix-org/luke/fix-welcome-user-background

Only view welcome user if we are not looking at a room
This commit is contained in:
David Baker 2017-06-05 14:38:55 +01:00 committed by GitHub
commit 85aa3f6f13

View file

@ -904,13 +904,14 @@ module.exports = React.createClass({
// Set the display name = user ID localpart // Set the display name = user ID localpart
MatrixClientPeg.get().setDisplayName( MatrixClientPeg.get().setDisplayName(
MatrixClientPeg.get().getUserIdLocalpart() MatrixClientPeg.get().getUserIdLocalpart(),
); );
if (this.props.config.welcomeUserId) { if (this.props.config.welcomeUserId) {
createRoom({ createRoom({
dmUserId: this.props.config.welcomeUserId, dmUserId: this.props.config.welcomeUserId,
andView: false, // Only view the welcome user if we're NOT looking at a room
andView: !this.state.currentRoomId,
}); });
return; return;
} }