MM-10722 Fix display name of other user after joining a channel (#1709)

* fix bundling failed with "mime-db" error

Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>

* fix display name of other user after joining a channel

Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
This commit is contained in:
Saturnino Abril 2018-05-29 22:28:58 +08:00 committed by Harrison Healey
parent cd3da28e1f
commit b500df868e

View file

@ -179,14 +179,17 @@ export default class CombinedSystemMessage extends React.PureComponent {
}
componentDidMount() {
this.loadUserProfiles();
this.loadUserProfiles(this.props.allUserIds);
}
loadUserProfiles = async () => {
const {
actions,
allUserIds,
} = this.props;
componentWillReceiveProps(nextProps) {
if (this.props.allUserIds !== nextProps.allUserIds) {
this.loadUserProfiles(nextProps.allUserIds);
}
}
loadUserProfiles = async (allUserIds) => {
const {actions} = this.props;
const {data: userProfiles} = await actions.getProfilesByIds(allUserIds);
this.setState({userProfiles});