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

Only view welcome user if we are not looking at a room
pull/21833/head
David Baker 2017-06-05 14:38:55 +01:00 committed by GitHub
commit 85aa3f6f13
1 changed files with 3 additions and 2 deletions

View File

@ -904,13 +904,14 @@ module.exports = React.createClass({
// Set the display name = user ID localpart
MatrixClientPeg.get().setDisplayName(
MatrixClientPeg.get().getUserIdLocalpart()
MatrixClientPeg.get().getUserIdLocalpart(),
);
if (this.props.config.welcomeUserId) {
createRoom({
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;
}