diff --git a/android/app/build.gradle b/android/app/build.gradle index 46bb77c94..face812f3 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -147,7 +147,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode VERSIONCODE as Integer - versionName "4.42.0" + versionName "4.42.2" vectorDrawables.useSupportLibrary = true if (!isFoss) { manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String] diff --git a/app/lib/methods/getServerInfo.ts b/app/lib/methods/getServerInfo.ts index 4954c01dd..c05d4e8f8 100644 --- a/app/lib/methods/getServerInfo.ts +++ b/app/lib/methods/getServerInfo.ts @@ -10,6 +10,7 @@ import { store } from '../store/auxStore'; import I18n from '../../i18n'; import { SIGNED_SUPPORTED_VERSIONS_PUBLIC_KEY } from '../constants'; import { getServerById } from '../database/services/Server'; +import log from './helpers/log'; interface IServerInfoFailure { success: false; @@ -75,6 +76,14 @@ export async function getServerInfo(server: string): Promise const cloudInfo = await getCloudInfo(server); + // Allows airgapped servers to use the app until enforcementStartDate + if (!cloudInfo) { + return { + ...jsonRes, + success: true + }; + } + // Makes use of signed JWT to get supported versions const supportedVersionsCloud = verifyJWT(cloudInfo?.signed); @@ -119,7 +128,12 @@ const getUniqueId = async (server: string): Promise => { }; export const getCloudInfo = async (domain: string): Promise => { - const uniqueId = await getUniqueId(domain); - const response = await getSupportedVersionsCloud(uniqueId, domain); - return response.json() as unknown as TCloudInfo; + try { + const uniqueId = await getUniqueId(domain); + const response = await getSupportedVersionsCloud(uniqueId, domain); + return response.json() as unknown as TCloudInfo; + } catch (e) { + log(e); + return null; + } }; diff --git a/ios/RocketChatRN.xcodeproj/project.pbxproj b/ios/RocketChatRN.xcodeproj/project.pbxproj index 997fc9474..b213f2392 100644 --- a/ios/RocketChatRN.xcodeproj/project.pbxproj +++ b/ios/RocketChatRN.xcodeproj/project.pbxproj @@ -1760,7 +1760,7 @@ INFOPLIST_FILE = NotificationService/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 4.42.0; + MARKETING_VERSION = 4.42.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; @@ -1799,7 +1799,7 @@ INFOPLIST_FILE = NotificationService/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 4.42.0; + MARKETING_VERSION = 4.42.2; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService; diff --git a/ios/RocketChatRN/Info.plist b/ios/RocketChatRN/Info.plist index c1b98975a..a51b4631c 100644 --- a/ios/RocketChatRN/Info.plist +++ b/ios/RocketChatRN/Info.plist @@ -26,7 +26,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 4.42.0 + 4.42.2 CFBundleSignature ???? CFBundleURLTypes diff --git a/ios/ShareRocketChatRN/Info.plist b/ios/ShareRocketChatRN/Info.plist index 2cd2cdb42..02368260c 100644 --- a/ios/ShareRocketChatRN/Info.plist +++ b/ios/ShareRocketChatRN/Info.plist @@ -26,7 +26,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 4.42.0 + 4.42.2 CFBundleVersion 1 KeychainGroup diff --git a/package.json b/package.json index 4c79513cd..add4a6b93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rocket-chat-reactnative", - "version": "4.42.0", + "version": "4.42.2", "private": true, "scripts": { "start": "react-native start",