From 2a6bb1ddc1271885f3501d560b7c3e85bc2840fd Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Fri, 18 Nov 2022 12:18:11 +0200 Subject: [PATCH] [Gekidou] Show alert message when server is unsupported (#6764) * Show alert message when server is unsupported * set server min required version to 5.26.2 --- app/actions/local/systems.ts | 66 ++++++++---- app/actions/remote/entry/app.ts | 4 + app/components/server_version/index.tsx | 53 ++++++---- app/constants/database.ts | 1 + app/constants/supported_server.ts | 8 +- app/managers/global_event_handler.ts | 3 +- app/queries/servers/system.ts | 7 ++ .../servers_list/server_item/server_item.tsx | 19 +--- app/screens/home/index.tsx | 100 +++++++++--------- app/screens/server/index.tsx | 18 +--- app/utils/push_proxy.ts | 18 ++++ app/utils/server/index.ts | 37 ++++--- app/utils/server/server.test.ts | 4 +- assets/base/config.json | 1 - assets/base/i18n/en.json | 11 +- 15 files changed, 199 insertions(+), 151 deletions(-) diff --git a/app/actions/local/systems.ts b/app/actions/local/systems.ts index 12dc681ac..0a463a1c1 100644 --- a/app/actions/local/systems.ts +++ b/app/actions/local/systems.ts @@ -40,35 +40,55 @@ export async function storeConfig(serverUrl: string, config: ClientConfig | unde if (!config) { return []; } - const {operator, database} = DatabaseManager.getServerDatabaseAndOperator(serverUrl); - const currentConfig = await getConfig(database); - const configsToUpdate: IdValue[] = []; - const configsToDelete: IdValue[] = []; - let k: keyof ClientConfig; - for (k in config) { - if (currentConfig?.[k] !== config[k]) { - configsToUpdate.push({ - id: k, - value: config[k], - }); - } - } - for (k in currentConfig) { - if (config[k] === undefined) { - configsToDelete.push({ - id: k, - value: currentConfig[k], - }); - } - } + try { + const {operator, database} = DatabaseManager.getServerDatabaseAndOperator(serverUrl); + const currentConfig = await getConfig(database); + const configsToUpdate: IdValue[] = []; + const configsToDelete: IdValue[] = []; - if (configsToDelete.length || configsToUpdate.length) { - return operator.handleConfigs({configs: configsToUpdate, configsToDelete, prepareRecordsOnly}); + let k: keyof ClientConfig; + for (k in config) { + if (currentConfig?.[k] !== config[k]) { + configsToUpdate.push({ + id: k, + value: config[k], + }); + } + } + for (k in currentConfig) { + if (config[k] === undefined) { + configsToDelete.push({ + id: k, + value: currentConfig[k], + }); + } + } + + if (configsToDelete.length || configsToUpdate.length) { + return operator.handleConfigs({configs: configsToUpdate, configsToDelete, prepareRecordsOnly}); + } + } catch (error) { + logError('storeConfig', error); } return []; } +export async function setLastServerVersionCheck(serverUrl: string, reset = false) { + try { + const {operator} = DatabaseManager.getServerDatabaseAndOperator(serverUrl); + await operator.handleSystem({ + systems: [{ + id: SYSTEM_IDENTIFIERS.LAST_SERVER_VERSION_CHECK, + value: reset ? 0 : Date.now(), + }], + prepareRecordsOnly: false, + }); + } catch (error) { + logError('setLastServerVersionCheck', error); + } +} + export async function dismissAnnouncement(serverUrl: string, announcementText: string) { try { const {operator} = DatabaseManager.getServerDatabaseAndOperator(serverUrl); diff --git a/app/actions/remote/entry/app.ts b/app/actions/remote/entry/app.ts index 2c8cdbe61..6ab47c433 100644 --- a/app/actions/remote/entry/app.ts +++ b/app/actions/remote/entry/app.ts @@ -1,6 +1,7 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. +import {setLastServerVersionCheck} from '@actions/local/systems'; import {switchToChannelById} from '@actions/remote/channel'; import {fetchConfigAndLicense} from '@actions/remote/systems'; import DatabaseManager from '@database/manager'; @@ -21,6 +22,9 @@ export async function appEntry(serverUrl: string, since = 0, isUpgrade = false) if (!since) { registerDeviceToken(serverUrl); + if (Object.keys(DatabaseManager.serverDatabases).length === 1) { + await setLastServerVersionCheck(serverUrl, true); + } } // clear lastUnreadChannelId diff --git a/app/components/server_version/index.tsx b/app/components/server_version/index.tsx index 4ef7a34c1..55ac7d7b9 100644 --- a/app/components/server_version/index.tsx +++ b/app/components/server_version/index.tsx @@ -4,47 +4,60 @@ import {withDatabase} from '@nozbe/watermelondb/DatabaseProvider'; import withObservables from '@nozbe/with-observables'; import {useEffect} from 'react'; -import {useIntl} from 'react-intl'; -import {map} from 'rxjs/operators'; +import {IntlShape, useIntl} from 'react-intl'; +import {distinctUntilChanged, map} from 'rxjs/operators'; -import {SupportedServer} from '@constants'; -import {observeConfigValue} from '@queries/servers/system'; +import {setLastServerVersionCheck} from '@actions/local/systems'; +import {useServerUrl} from '@context/server'; +import DatabaseManager from '@database/manager'; +import {queryServer} from '@queries/app/servers'; +import {observeConfigValue, observeLastServerVersionCheck} from '@queries/servers/system'; import {observeCurrentUser} from '@queries/servers/user'; -import {isMinimumServerVersion} from '@utils/helpers'; -import {unsupportedServer} from '@utils/server'; +import {isSupportedServer, unsupportedServer} from '@utils/server'; import {isSystemAdmin} from '@utils/user'; import type {WithDatabaseArgs} from '@typings/database/database'; -type ServerVersionProps = WithDatabaseArgs & { +type ServerVersionProps = { + isAdmin: boolean; + lastChecked: number; version?: string; - roles: string; }; -const ServerVersion = ({version, roles}: ServerVersionProps) => { +const VALIDATE_INTERVAL = 24 * 60 * 60 * 1000; // 24 hours + +const handleUnsupportedServer = async (serverUrl: string, isAdmin: boolean, intl: IntlShape) => { + const appDatabase = DatabaseManager.appDatabase?.database; + if (appDatabase) { + const serverModel = await queryServer(appDatabase, serverUrl); + unsupportedServer(serverModel?.displayName || '', isAdmin, intl); + setLastServerVersionCheck(serverUrl); + } +}; + +const ServerVersion = ({isAdmin, lastChecked, version}: ServerVersionProps) => { const intl = useIntl(); + const serverUrl = useServerUrl(); useEffect(() => { const serverVersion = version || ''; + const shouldValidate = (Date.now() - lastChecked) >= VALIDATE_INTERVAL || !lastChecked; - if (serverVersion) { - const {MAJOR_VERSION, MIN_VERSION, PATCH_VERSION} = SupportedServer; - const isSupportedServer = isMinimumServerVersion(serverVersion, MAJOR_VERSION, MIN_VERSION, PATCH_VERSION); - - if (!isSupportedServer) { - // Only display the Alert if the TOS does not need to show first - unsupportedServer(isSystemAdmin(roles), intl); - } + if (serverVersion && shouldValidate && !isSupportedServer(serverVersion)) { + // Only display the Alert if the TOS does not need to show first + handleUnsupportedServer(serverUrl, isAdmin, intl); } - }, [version, roles]); + }, [version, isAdmin, lastChecked, serverUrl]); return null; }; const enahanced = withObservables([], ({database}: WithDatabaseArgs) => ({ + lastChecked: observeLastServerVersionCheck(database), version: observeConfigValue(database, 'Version'), - roles: observeCurrentUser(database).pipe( - map((user) => user?.roles), + isAdmin: observeCurrentUser(database).pipe( + map((user) => isSystemAdmin(user?.roles || '')), + distinctUntilChanged(), ), })); diff --git a/app/constants/database.ts b/app/constants/database.ts index 4e0f802ec..4660e4812 100644 --- a/app/constants/database.ts +++ b/app/constants/database.ts @@ -59,6 +59,7 @@ export const SYSTEM_IDENTIFIERS = { DATA_RETENTION_POLICIES: 'dataRetentionPolicies', EXPANDED_LINKS: 'expandedLinks', LAST_DISMISSED_BANNER: 'lastDismissedBanner', + LAST_SERVER_VERSION_CHECK: 'LastServerVersionCheck', LICENSE: 'license', ONLY_UNREADS: 'onlyUnreads', PUSH_VERIFICATION_STATUS: 'pushVerificationStatus', diff --git a/app/constants/supported_server.ts b/app/constants/supported_server.ts index 312939494..10fecfdb9 100644 --- a/app/constants/supported_server.ts +++ b/app/constants/supported_server.ts @@ -1,12 +1,14 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -export const FULL_VERSION = '6.0.0'; -export const MAJOR_VERSION = 0; -export const MIN_VERSION = 0; +export const MIN_REQUIRED_VERSION = '5.26.2'; +export const FULL_VERSION = '7.1.0'; +export const MAJOR_VERSION = 7; +export const MIN_VERSION = 1; export const PATCH_VERSION = 0; export default { + MIN_REQUIRED_VERSION, FULL_VERSION, MAJOR_VERSION, MIN_VERSION, diff --git a/app/managers/global_event_handler.ts b/app/managers/global_event_handler.ts index c3982330e..28ab25db6 100644 --- a/app/managers/global_event_handler.ts +++ b/app/managers/global_event_handler.ts @@ -8,6 +8,7 @@ import semver from 'semver'; import {autoUpdateTimezone} from '@actions/remote/user'; import LocalConfig from '@assets/config.json'; import {Events, Sso} from '@constants'; +import {MIN_REQUIRED_VERSION} from '@constants/supported_server'; import DatabaseManager from '@database/manager'; import {DEFAULT_LOCALE, getTranslations, t} from '@i18n'; import {getServerCredentials} from '@init/credentials'; @@ -81,7 +82,7 @@ class GlobalEventHandler { const translations = getTranslations(locale); if (version) { - if (semver.valid(version) && semver.lt(version, LocalConfig.MinServerVersion)) { + if (semver.valid(version) && semver.lt(version, MIN_REQUIRED_VERSION)) { Alert.alert( translations[t('mobile.server_upgrade.title')], translations[t('mobile.server_upgrade.description')], diff --git a/app/queries/servers/system.ts b/app/queries/servers/system.ts index 455af01a4..a47bd5f6a 100644 --- a/app/queries/servers/system.ts +++ b/app/queries/servers/system.ts @@ -466,3 +466,10 @@ export const observeCanUploadFiles = (database: Database) => { ), ); }; + +export const observeLastServerVersionCheck = (database: Database) => { + return querySystemValue(database, SYSTEM_IDENTIFIERS.LAST_SERVER_VERSION_CHECK).observeWithColumns(['value']).pipe( + switchMap((result) => (result.length ? result[0].observe() : of$({value: 0}))), + switchMap((model) => of$(parseInt(model.value, 10))), + ); +}; diff --git a/app/screens/home/channel_list/servers/servers_list/server_item/server_item.tsx b/app/screens/home/channel_list/servers/servers_list/server_item/server_item.tsx index 48181deeb..98da05763 100644 --- a/app/screens/home/channel_list/servers/servers_list/server_item/server_item.tsx +++ b/app/screens/home/channel_list/servers/servers_list/server_item/server_item.tsx @@ -18,15 +18,14 @@ import ServerIcon from '@components/server_icon'; import TutorialHighlight from '@components/tutorial_highlight'; import TutorialSwipeLeft from '@components/tutorial_highlight/swipe_left'; import {Events} from '@constants'; -import {PUSH_PROXY_RESPONSE_NOT_AVAILABLE, PUSH_PROXY_RESPONSE_UNKNOWN, PUSH_PROXY_STATUS_NOT_AVAILABLE, PUSH_PROXY_STATUS_UNKNOWN, PUSH_PROXY_STATUS_VERIFIED} from '@constants/push_proxy'; +import {PUSH_PROXY_STATUS_NOT_AVAILABLE, PUSH_PROXY_STATUS_VERIFIED} from '@constants/push_proxy'; import {useTheme} from '@context/theme'; import DatabaseManager from '@database/manager'; import {subscribeServerUnreadAndMentions, UnreadObserverArgs} from '@database/subscription/unreads'; import {useIsTablet} from '@hooks/device'; import {queryServerByIdentifier} from '@queries/app/servers'; import {dismissBottomSheet} from '@screens/navigation'; -import EphemeralStore from '@store/ephemeral_store'; -import {alertPushProxyError, alertPushProxyUnknown} from '@utils/push_proxy'; +import {canReceiveNotifications} from '@utils/push_proxy'; import {alertServerAlreadyConnected, alertServerError, alertServerLogout, alertServerRemove, editServer, loginToServer} from '@utils/server'; import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme'; import {typography} from '@utils/typography'; @@ -251,19 +250,7 @@ const ServerItem = ({ return; } - switch (result.canReceiveNotifications) { - case PUSH_PROXY_RESPONSE_NOT_AVAILABLE: - EphemeralStore.setPushProxyVerificationState(server.url, PUSH_PROXY_STATUS_NOT_AVAILABLE); - alertPushProxyError(intl); - break; - case PUSH_PROXY_RESPONSE_UNKNOWN: - EphemeralStore.setPushProxyVerificationState(server.url, PUSH_PROXY_STATUS_UNKNOWN); - alertPushProxyUnknown(intl); - break; - default: - EphemeralStore.setPushProxyVerificationState(server.url, PUSH_PROXY_STATUS_VERIFIED); - } - + canReceiveNotifications(server.url, result.canReceiveNotifications as string, intl); loginToServer(theme, server.url, displayName, data.config!, data.license!); }, [server, theme, intl]); diff --git a/app/screens/home/index.tsx b/app/screens/home/index.tsx index e19df8e3e..5389ce3f8 100644 --- a/app/screens/home/index.tsx +++ b/app/screens/home/index.tsx @@ -9,6 +9,7 @@ import {DeviceEventEmitter, Platform} from 'react-native'; import HWKeyboardEvent from 'react-native-hw-keyboard-event'; import {enableFreeze, enableScreens} from 'react-native-screens'; +import ServerVersion from '@components/server_version'; import {Events, Screens} from '@constants'; import {useTheme} from '@context/theme'; import {findChannels, popToRoot} from '@screens/navigation'; @@ -96,55 +97,58 @@ export default function HomeScreen(props: HomeProps) { }, [intl.locale]); return ( - - ( - )} + <> + - ( + )} > - {() => } - - - - - - - + + {() => } + + + + + + + + + ); } diff --git a/app/screens/server/index.tsx b/app/screens/server/index.tsx index ec6a44c99..1422820be 100644 --- a/app/screens/server/index.tsx +++ b/app/screens/server/index.tsx @@ -16,16 +16,14 @@ import LocalConfig from '@assets/config.json'; import ClientError from '@client/rest/error'; import AppVersion from '@components/app_version'; import {Screens, Launch} from '@constants'; -import {PUSH_PROXY_RESPONSE_NOT_AVAILABLE, PUSH_PROXY_RESPONSE_UNKNOWN, PUSH_PROXY_STATUS_NOT_AVAILABLE, PUSH_PROXY_STATUS_UNKNOWN, PUSH_PROXY_STATUS_VERIFIED} from '@constants/push_proxy'; import DatabaseManager from '@database/manager'; import {t} from '@i18n'; import NetworkManager from '@managers/network_manager'; import {queryServerByDisplayName, queryServerByIdentifier} from '@queries/app/servers'; import Background from '@screens/background'; import {dismissModal, goToScreen, loginAnimationOptions} from '@screens/navigation'; -import EphemeralStore from '@store/ephemeral_store'; import {getErrorMessage} from '@utils/client_error'; -import {alertPushProxyError, alertPushProxyUnknown} from '@utils/push_proxy'; +import {canReceiveNotifications} from '@utils/push_proxy'; import {loginOptions} from '@utils/server'; import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme'; import {getServerUrlAfterRedirect, isValidUrl, sanitizeUrl} from '@utils/url'; @@ -270,19 +268,7 @@ const Server = ({ return; } - switch (result.canReceiveNotifications) { - case PUSH_PROXY_RESPONSE_NOT_AVAILABLE: - EphemeralStore.setPushProxyVerificationState(serverUrl, PUSH_PROXY_STATUS_NOT_AVAILABLE); - alertPushProxyError(intl); - break; - case PUSH_PROXY_RESPONSE_UNKNOWN: - EphemeralStore.setPushProxyVerificationState(serverUrl, PUSH_PROXY_STATUS_UNKNOWN); - alertPushProxyUnknown(intl); - break; - default: - EphemeralStore.setPushProxyVerificationState(serverUrl, PUSH_PROXY_STATUS_VERIFIED); - } - + canReceiveNotifications(serverUrl, result.canReceiveNotifications as string, intl); const data = await fetchConfigAndLicense(serverUrl, true); if (data.error) { setButtonDisabled(true); diff --git a/app/utils/push_proxy.ts b/app/utils/push_proxy.ts index 6c9707fa4..999504742 100644 --- a/app/utils/push_proxy.ts +++ b/app/utils/push_proxy.ts @@ -4,6 +4,24 @@ import {IntlShape} from 'react-intl'; import {Alert} from 'react-native'; +import {PUSH_PROXY_RESPONSE_NOT_AVAILABLE, PUSH_PROXY_RESPONSE_UNKNOWN, PUSH_PROXY_STATUS_NOT_AVAILABLE, PUSH_PROXY_STATUS_UNKNOWN, PUSH_PROXY_STATUS_VERIFIED} from '@constants/push_proxy'; +import EphemeralStore from '@store/ephemeral_store'; + +export function canReceiveNotifications(serverUrl: string, verification: string, intl: IntlShape) { + switch (verification) { + case PUSH_PROXY_RESPONSE_NOT_AVAILABLE: + EphemeralStore.setPushProxyVerificationState(serverUrl, PUSH_PROXY_STATUS_NOT_AVAILABLE); + alertPushProxyError(intl); + break; + case PUSH_PROXY_RESPONSE_UNKNOWN: + EphemeralStore.setPushProxyVerificationState(serverUrl, PUSH_PROXY_STATUS_UNKNOWN); + alertPushProxyUnknown(intl); + break; + default: + EphemeralStore.setPushProxyVerificationState(serverUrl, PUSH_PROXY_STATUS_VERIFIED); + } +} + export function alertPushProxyError(intl: IntlShape) { Alert.alert( intl.formatMessage({ diff --git a/app/utils/server/index.ts b/app/utils/server/index.ts index b3a53b209..2592d696b 100644 --- a/app/utils/server/index.ts +++ b/app/utils/server/index.ts @@ -8,16 +8,21 @@ import CompassIcon from '@components/compass_icon'; import {Screens, Sso, SupportedServer, Launch} from '@constants'; import {dismissBottomSheet, showModal} from '@screens/navigation'; import {getErrorMessage} from '@utils/client_error'; +import {isMinimumServerVersion} from '@utils/helpers'; import {changeOpacity} from '@utils/theme'; import {tryOpenURL} from '@utils/url'; import type ServersModel from '@typings/database/models/app/servers'; -export function unsupportedServer(isSystemAdmin: boolean, intl: IntlShape) { +export function isSupportedServer(currentVersion: string) { + return isMinimumServerVersion(currentVersion, SupportedServer.MAJOR_VERSION, SupportedServer.MIN_VERSION, SupportedServer.PATCH_VERSION); +} + +export function unsupportedServer(serverDisplayName: string, isSystemAdmin: boolean, intl: IntlShape, onPress?: () => void) { if (isSystemAdmin) { - return unsupportedServerAdminAlert(intl); + return unsupportedServerAdminAlert(serverDisplayName, intl, onPress); } - return unsupportedServerAlert(intl); + return unsupportedServerAlert(serverDisplayName, intl, onPress); } export function semverFromServerVersion(value: string) { @@ -179,21 +184,22 @@ export function alertServerAlreadyConnected(intl: IntlShape) { ); } -function unsupportedServerAdminAlert(intl: IntlShape) { +function unsupportedServerAdminAlert(serverDisplayName: string, intl: IntlShape, onPress?: () => void) { const title = intl.formatMessage({id: 'mobile.server_upgrade.title', defaultMessage: 'Server upgrade required'}); const message = intl.formatMessage({ - id: 'mobile.server_upgrade.alert_description', - defaultMessage: 'This server version is unsupported and users will be exposed to compatibility issues that cause crashes or severe bugs breaking core functionality of the app. Upgrading to server version {serverVersion} or later is required.', - }, {serverVersion: SupportedServer.FULL_VERSION}); + id: 'server_upgrade.alert_description', + defaultMessage: 'Your server, {serverDisplayName}, is running an unsupported server version. Users will be exposed to compatibility issues that cause crashes or severe bugs breaking core functionality of the app. Upgrading to server version {supportedServerVersion} or later is required.', + }, {serverDisplayName, supportedServerVersion: SupportedServer.FULL_VERSION}); const cancel: AlertButton = { - text: intl.formatMessage({id: 'mobile.server_upgrade.dismiss', defaultMessage: 'Dismiss'}), + text: intl.formatMessage({id: 'server_upgrade.dismiss', defaultMessage: 'Dismiss'}), style: 'default', + onPress, }; const learnMore: AlertButton = { - text: intl.formatMessage({id: 'mobile.server_upgrade.learn_more', defaultMessage: 'Learn More'}), + text: intl.formatMessage({id: 'server_upgrade.learn_more', defaultMessage: 'Learn More'}), style: 'cancel', onPress: () => { const url = 'https://docs.mattermost.com/administration/release-lifecycle.html'; @@ -213,17 +219,18 @@ function unsupportedServerAdminAlert(intl: IntlShape) { Alert.alert(title, message, buttons, options); } -function unsupportedServerAlert(intl: IntlShape) { - const title = intl.formatMessage({id: 'mobile.unsupported_server.title', defaultMessage: 'Unsupported server version'}); +function unsupportedServerAlert(serverDisplayName: string, intl: IntlShape, onPress?: () => void) { + const title = intl.formatMessage({id: 'unsupported_server.title', defaultMessage: 'Unsupported server version'}); const message = intl.formatMessage({ - id: 'mobile.unsupported_server.message', - defaultMessage: 'Attachments, link previews, reactions and embed data may not be displayed correctly. If this issue persists contact your System Administrator to upgrade your Mattermost server.', - }); + id: 'unsupported_server.message', + defaultMessage: 'Your server, {serverDisplayName}, is running an unsupported server version. You may experience compatibility issues that cause crashes or severe bugs breaking core functionality of the app. Please contact your System Administrator to upgrade your Mattermost server.', + }, {serverDisplayName}); const okButton: AlertButton = { - text: intl.formatMessage({id: 'mobile.unsupported_server.ok', defaultMessage: 'OK'}), + text: intl.formatMessage({id: 'mobile.server_upgrade.button', defaultMessage: 'OK'}), style: 'default', + onPress, }; const buttons: AlertButton[] = [okButton]; diff --git a/app/utils/server/server.test.ts b/app/utils/server/server.test.ts index ffbaf1348..b7e0ab691 100644 --- a/app/utils/server/server.test.ts +++ b/app/utils/server/server.test.ts @@ -12,13 +12,13 @@ describe('Unsupported Server Alert', () => { it('should show the alert for sysadmin', () => { const alert = jest.spyOn(Alert, 'alert'); - unsupportedServer(true, intl); + unsupportedServer('Default Server', true, intl); expect(alert?.mock?.calls?.[0]?.[2]?.length).toBe(2); }); it('should show the alert for team admin / user', () => { const alert = jest.spyOn(Alert, 'alert'); - unsupportedServer(false, intl); + unsupportedServer('Default Server', false, intl); expect(alert?.mock?.calls?.[0]?.[2]?.length).toBe(1); }); }); diff --git a/assets/base/config.json b/assets/base/config.json index 2212700d5..d29dc8a6f 100644 --- a/assets/base/config.json +++ b/assets/base/config.json @@ -4,7 +4,6 @@ "TestServerUrl": "http://localhost:8065", "DefaultTheme": "default", "ShowErrorsList": false, - "MinServerVersion": "5.25.0", "EELearnURL": "about.mattermost.com", "TeamEditionLearnURL": "mattermost.org", "AboutTeamURL": "http://www.mattermost.org/", diff --git a/assets/base/i18n/en.json b/assets/base/i18n/en.json index 8d38f01d8..d7ae5cfcf 100644 --- a/assets/base/i18n/en.json +++ b/assets/base/i18n/en.json @@ -564,11 +564,8 @@ "mobile.server_name.exists": "You are using this name for another server.", "mobile.server_ping_failed": "Cannot connect to the server.", "mobile.server_requires_client_certificate": "Server requires client certificate for authentication.", - "mobile.server_upgrade.alert_description": "This server version is unsupported and users will be exposed to compatibility issues that cause crashes or severe bugs breaking core functionality of the app. Upgrading to server version {serverVersion} or later is required.", "mobile.server_upgrade.button": "OK", "mobile.server_upgrade.description": "\nA server upgrade is required to use the Mattermost app. Please ask your System Administrator for details.\n", - "mobile.server_upgrade.dismiss": "Dismiss", - "mobile.server_upgrade.learn_more": "Learn More", "mobile.server_upgrade.title": "Server upgrade required", "mobile.server_url.deeplink.emm.denied": "This app is controlled by an EMM and the DeepLink server url does not match the EMM allowed server", "mobile.server_url.empty": "Please enter a valid server URL", @@ -592,9 +589,6 @@ "mobile.system_message.update_channel_purpose_message.updated_from": "{username} updated the channel purpose from: {oldPurpose} to: {newPurpose}", "mobile.system_message.update_channel_purpose_message.updated_to": "{username} updated the channel purpose to: {newPurpose}", "mobile.tos_link": "Terms of Service", - "mobile.unsupported_server.message": "Attachments, link previews, reactions and embed data may not be displayed correctly. If this issue persists contact your System Administrator to upgrade your Mattermost server.", - "mobile.unsupported_server.ok": "OK", - "mobile.unsupported_server.title": "Unsupported server version", "mobile.user_list.deactivated": "Deactivated", "mobile.write_storage_permission_denied_description": "Save files to your device. Open Settings to grant {applicationName} write access to files on this device.", "modal.manual_status.auto_responder.message_": "Would you like to switch your status to \"{status}\" and disable Automatic Replies?", @@ -741,6 +735,9 @@ "select_team.title": "Select a team", "server_list.push_proxy_error": "Notifications cannot be received from this server because of its configuration. Contact your system admin.", "server_list.push_proxy_unknown": "Notifications could not be received from this server because of its configuration. Log out and Log in again to retry.", + "server_upgrade.alert_description": "Your server, {serverDisplayName}, is running an unsupported server version. Users will be exposed to compatibility issues that cause crashes or severe bugs breaking core functionality of the app. Upgrading to server version {supportedServerVersion} or later is required.", + "server_upgrade.dismiss": "Dismiss", + "server_upgrade.learn_more": "Learn More", "server.logout.alert_description": "All associated data will be removed", "server.logout.alert_title": "Are you sure you want to log out of {displayName}?", "server.remove.alert_description": "This will remove it from your list of servers. All associated data will be removed", @@ -830,6 +827,8 @@ "unreads.empty.paragraph": "Turn off the unread filter to show all your channels.", "unreads.empty.show_all": "Show all", "unreads.empty.title": "No more unreads", + "unsupported_server.message": "Your server, {serverDisplayName}, is running an unsupported server version. You may experience compatibility issues that cause crashes or severe bugs breaking core functionality of the app. Please contact your System Administrator to upgrade your Mattermost server.", + "unsupported_server.title": "Unsupported server version", "user_profile.custom_status": "Custom Status", "user.edit_profile.email.auth_service": "Login occurs through {service}. Email cannot be updated. Email address used for notifications is {email}.", "user.edit_profile.email.web_client": "Email must be updated using a web client or desktop application.",