1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-18 09:22:18 +03:00

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

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;
}