Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove end user message for unsupported servers #8404

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions app/utils/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ export function isSupportedServer(currentVersion: string) {

export function unsupportedServer(serverDisplayName: string, isSystemAdmin: boolean, intl: IntlShape, onPress?: () => void) {
if (isSystemAdmin) {
return unsupportedServerAdminAlert(serverDisplayName, intl, onPress);
unsupportedServerAdminAlert(serverDisplayName, intl, onPress);
}
return unsupportedServerAlert(serverDisplayName, intl, onPress);
}

export function semverFromServerVersion(value: string) {
Expand Down Expand Up @@ -245,26 +244,6 @@ function unsupportedServerAdminAlert(serverDisplayName: string, intl: IntlShape,
Alert.alert(title, message, buttons, options);
}

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: '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.server_upgrade.button', defaultMessage: 'OK'}),
style: 'default',
onPress,
};

const buttons: AlertButton[] = [okButton];
const options = {cancelable: false};

Alert.alert(title, message, buttons, options);
}

function buildServerModalOptions(theme: Theme, closeButtonId: string) {
const closeButton = CompassIcon.getImageSourceSync('close', 24, changeOpacity(theme.centerChannelColor, 0.56));
const closeButtonTestId = `${closeButtonId.replace('close-', 'close.').replace(/-/g, '_')}.button`;
Expand Down
2 changes: 0 additions & 2 deletions assets/base/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,6 @@
"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_settings.notifications.test_notification.body": "Not receiving notifications? Start by sending a test notification to all your devices to check if they’re working as expected. If issues persist, explore ways to solve them with troubleshooting steps.",
"user_settings.notifications.test_notification.go_to_docs": "Troubleshooting docs",
Expand Down
Loading