fix DM's channel displayname (instead of "Someone") after creating a DM (#1721)

This commit is contained in:
Saturnino Abril 2018-06-05 03:18:14 +08:00 committed by GitHub
parent 78acd89222
commit 4db67a9734
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -382,11 +382,12 @@ class MoreDirectMessages extends PureComponent {
makeDirectChannel = async (id) => {
const {
actions,
allProfiles,
intl,
teammateNameDisplay,
} = this.props;
const user = this.state.profiles[id];
const user = allProfiles[id];
const displayName = displayUsername(user, teammateNameDisplay);
actions.setChannelDisplayName(displayName);