diff --git a/app/components/emoji/index.js b/app/components/emoji/index.js index c821839cd..762b9480d 100644 --- a/app/components/emoji/index.js +++ b/app/components/emoji/index.js @@ -10,11 +10,11 @@ import {Client4} from 'mattermost-redux/client'; import {isMinimumServerVersion} from 'mattermost-redux/utils/helpers'; import {EmojiIndicesByAlias, Emojis} from 'app/utils/emojis'; -import {doesMatchNamedEmoji} from 'app/utils/emoji_utils'; import Emoji from './emoji'; function mapStateToProps(state, ownProps) { + const config = getConfig(state); const emojiName = ownProps.emojiName; const customEmojis = getCustomEmojisByName(state); @@ -30,8 +30,8 @@ function mapStateToProps(state, ownProps) { isCustomEmoji = true; } else { displayTextOnly = state.entities.emojis.nonExistentEmoji.has(emojiName) || - (doesMatchNamedEmoji(`:${emojiName}:`) && !customEmojis.has(emojiName)) || - getConfig(state).EnableCustomEmoji !== 'true' || + config.EnableCustomEmoji !== 'true' || + config.ExperimentalEnablePostMetadata === 'true' || getCurrentUserId(state) === '' || !isMinimumServerVersion(Client4.getServerVersion(), 4, 7); }