diff --git a/app/components/channel_intro/channel_intro.js b/app/components/channel_intro/channel_intro.js index cce432a04..92290424a 100644 --- a/app/components/channel_intro/channel_intro.js +++ b/app/components/channel_intro/channel_intro.js @@ -9,7 +9,7 @@ import { } from 'react-native'; import {injectIntl, intlShape} from 'react-intl'; -import {getFullName} from 'mattermost-redux/utils/user_utils'; +import {displayUsername} from 'mattermost-redux/utils/user_utils'; import {General} from 'mattermost-redux/constants'; import {goToScreen} from 'app/actions/navigation'; @@ -30,6 +30,7 @@ class ChannelIntro extends PureComponent { intl: intlShape.isRequired, theme: PropTypes.object.isRequired, isLandscape: PropTypes.bool.isRequired, + teammateNameDisplay: PropTypes.string.isRequired, }; static defaultProps = { @@ -48,11 +49,12 @@ class ChannelIntro extends PureComponent { }; getDisplayName = (member) => { + const {teammateNameDisplay} = this.props; if (!member) { return null; } - const displayName = getFullName(member); + const displayName = displayUsername(member, teammateNameDisplay); if (!displayName) { return member.username; diff --git a/app/components/channel_intro/index.js b/app/components/channel_intro/index.js index 69d279f5c..8a58057c9 100644 --- a/app/components/channel_intro/index.js +++ b/app/components/channel_intro/index.js @@ -8,7 +8,7 @@ import {General} from 'mattermost-redux/constants'; import {makeGetChannel} from 'mattermost-redux/selectors/entities/channels'; import {getCurrentUserId, getUser, makeGetProfilesInChannel} from 'mattermost-redux/selectors/entities/users'; -import {getTheme} from 'mattermost-redux/selectors/entities/preferences'; +import {getTeammateNameDisplaySetting, getTheme} from 'mattermost-redux/selectors/entities/preferences'; import {isLandscape} from 'app/selectors/device'; import {getChannelMembersForDm} from 'app/selectors/channel'; @@ -49,6 +49,7 @@ function makeMapStateToProps() { currentChannelMembers, theme: getTheme(state), isLandscape: isLandscape(state), + teammateNameDisplay: getTeammateNameDisplaySetting(state), }; }; } diff --git a/package-lock.json b/package-lock.json index 6641af864..24b3a7aad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9955,8 +9955,8 @@ } }, "mattermost-redux": { - "version": "github:mattermost/mattermost-redux#72bb238de055e9bda3e6cfe7663e5d738f7d05e4", - "from": "github:mattermost/mattermost-redux#72bb238de055e9bda3e6cfe7663e5d738f7d05e4", + "version": "github:mattermost/mattermost-redux#7c598c50a9d53e68503c8bc48ac258b09a15d1fb", + "from": "github:mattermost/mattermost-redux#7c598c50a9d53e68503c8bc48ac258b09a15d1fb", "requires": { "core-js": "3.1.4", "form-data": "2.5.1", diff --git a/package.json b/package.json index cab37c43a..70870a2f1 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "intl": "1.2.5", "jail-monkey": "2.3.1", "jsc-android": "241213.2.0", - "mattermost-redux": "github:mattermost/mattermost-redux#72bb238de055e9bda3e6cfe7663e5d738f7d05e4", + "mattermost-redux": "github:mattermost/mattermost-redux#7c598c50a9d53e68503c8bc48ac258b09a15d1fb", "mime-db": "1.43.0", "moment-timezone": "0.5.27", "prop-types": "15.7.2",