Skip to content

Commit

Permalink
chore: Merge 4.42.2 into master (#5340)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello authored Nov 13, 2023
2 parents 3bcbfb8 + 1016ed4 commit 8502e4a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
20 changes: 17 additions & 3 deletions app/lib/methods/getServerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -75,6 +76,14 @@ export async function getServerInfo(server: string): Promise<TServerInfoResult>

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);

Expand Down Expand Up @@ -119,7 +128,12 @@ const getUniqueId = async (server: string): Promise<string> => {
};

export const getCloudInfo = async (domain: string): Promise<TCloudInfo | null> => {
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;
}
};
4 changes: 2 additions & 2 deletions ios/RocketChatRN.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ios/RocketChatRN/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.42.0</string>
<string>4.42.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ShareRocketChatRN/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>4.42.0</string>
<string>4.42.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>KeychainGroup</key>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rocket-chat-reactnative",
"version": "4.42.0",
"version": "4.42.2",
"private": true,
"scripts": {
"start": "react-native start",
Expand Down

0 comments on commit 8502e4a

Please sign in to comment.