mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge branch 'master' into fix-email
This commit is contained in:
@@ -392,10 +392,14 @@ export default class Navbar extends React.Component {
|
||||
} else if (channel.type === 'D') {
|
||||
isDirect = true;
|
||||
if (this.state.users.length > 1) {
|
||||
let p;
|
||||
if (this.state.users[0].id === currentId) {
|
||||
channelTitle = UserStore.getProfile(this.state.users[1].id).username;
|
||||
p = UserStore.getProfile(this.state.users[1].id);
|
||||
} else {
|
||||
channelTitle = UserStore.getProfile(this.state.users[0].id).username;
|
||||
p = UserStore.getProfile(this.state.users[0].id);
|
||||
}
|
||||
if (p != null) {
|
||||
channelTitle = p.username;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,10 @@ export default class Sidebar extends React.Component {
|
||||
|
||||
let currentChannelName = channel.display_name;
|
||||
if (channel.type === 'D') {
|
||||
currentChannelName = Utils.getDirectTeammate(channel.id).username;
|
||||
const teammate = Utils.getDirectTeammate(channel.id);
|
||||
if (teammate != null) {
|
||||
currentChannelName = teammate.username;
|
||||
}
|
||||
}
|
||||
|
||||
const unread = this.getTotalUnreadCount();
|
||||
|
||||
Reference in New Issue
Block a user