diff --git a/app/components/post_body_additional_content/index.js b/app/components/post_body_additional_content/index.js index 9750744e2..ab4db7c34 100644 --- a/app/components/post_body_additional_content/index.js +++ b/app/components/post_body_additional_content/index.js @@ -36,9 +36,13 @@ function makeMapStateToProps() { return function mapStateToProps(state, ownProps) { const config = getConfig(state); - const previewsEnabled = getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, `${ViewTypes.FEATURE_TOGGLE_PREFIX}${ViewTypes.EMBED_PREVIEW}`); const link = getFirstLink(ownProps.message); + // Link previews used to be an advanced settings until server version 4.4 when it was changed to be a display setting. + // We are checking both here until we bump the server requirement for the mobile apps. + const previewsEnabled = getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, `${ViewTypes.FEATURE_TOGGLE_PREFIX}${ViewTypes.EMBED_PREVIEW}`) || + getBool(state, Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.LINK_PREVIEW_DISPLAY, true); + return { ...getDimensions(state), config, diff --git a/app/constants/view.js b/app/constants/view.js index 6c3ad6c65..9114be382 100644 --- a/app/constants/view.js +++ b/app/constants/view.js @@ -68,6 +68,7 @@ export default { POST_VISIBILITY_CHUNK_SIZE: 15, FEATURE_TOGGLE_PREFIX: 'feature_enabled_', EMBED_PREVIEW: 'embed_preview', + LINK_PREVIEW_DISPLAY: 'link_previews', MIN_CHANNELNAME_LENGTH: 2, MAX_CHANNELNAME_LENGTH: 22, ANDROID_TOP_LANDSCAPE: 46,