Compare commits

...

7 Commits

Author SHA1 Message Date
Mattermost Build
40f61d6b2f Bump app build number to 256 (#3750) 2019-12-20 14:03:48 -03:00
Mattermost Build
f5b9583670 Fix RN patch for CBA support (#3747) 2019-12-20 14:00:25 -03:00
Mattermost Build
0134ab31b7 Bump app build number to 255 (#3742) 2019-12-19 21:47:35 -07:00
Mattermost Build
8d26937830 Automated cherry pick of #3738 (#3739)
* Fix headers for ESR 5.9

* check if reactions is defined to avoid a crash with servers without metadata

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2019-12-19 21:37:58 -07:00
Mattermost Build
09172ac532 Bump app build number to 254 (#3734) 2019-12-18 21:43:45 -07:00
Mattermost Build
387b6aec2b Bump app version number to 1.26.1 (#3731) 2019-12-18 21:39:29 -07:00
Miguel Alatzar
e653a290e8 Upgrade jsc-android (#3720) (#3728) 2019-12-18 21:29:14 -07:00
11 changed files with 73 additions and 24 deletions

View File

@@ -140,8 +140,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative60"
versionCode 253
versionName "1.26.0"
versionCode 256
versionName "1.26.1"
multiDexEnabled = true
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

View File

@@ -44,7 +44,12 @@ function makeMapStateToProps() {
channel: channelId,
permission: Permissions.ADD_REACTION,
});
canAddMoreReactions = Object.values(reactions).length < MAX_ALLOWED_REACTIONS;
if (reactions) {
// On servers without metadata reactions at this point can be undefined
canAddMoreReactions = Object.values(reactions).length < MAX_ALLOWED_REACTIONS;
}
canRemoveReaction = haveIChannelPermission(state, {
team: teamId,
channel: channelId,

View File

@@ -19,7 +19,14 @@ export function setCSRFFromCookie(url) {
CookieManager.get(url, false).then((res) => {
const token = res.MMCSRF;
if (token) {
Client4.setCSRF(token?.value || token);
let value = null;
if (typeof token === 'object' && Object.prototype.hasOwnProperty.call(token, 'value')) {
value = token.value;
} else {
value = token;
}
Client4.setCSRF(value);
}
resolve();
});

View File

@@ -1112,7 +1112,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 253;
CURRENT_PROJECT_VERSION = 256;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
@@ -1150,7 +1150,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 253;
CURRENT_PROJECT_VERSION = 256;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;

View File

@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.26.0</string>
<string>1.26.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>253</string>
<string>256</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View File

@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.26.0</string>
<string>1.26.1</string>
<key>CFBundleVersion</key>
<string>253</string>
<string>256</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>

View File

@@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.26.0</string>
<string>1.26.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>253</string>
<string>256</string>
</dict>
</plist>

View File

@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.26.0</string>
<string>1.26.1</string>
<key>CFBundleVersion</key>
<string>253</string>
<string>256</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>

12
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "mattermost-mobile",
"version": "1.26.0",
"version": "1.26.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -4311,7 +4311,7 @@
"dependencies": {
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true
}
@@ -6675,9 +6675,9 @@
"dev": true
},
"jsc-android": {
"version": "241213.1.0",
"resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-241213.1.0.tgz",
"integrity": "sha512-AH8NYyMNLNhcUEF97QbMxPNLNW+oiSBlvm1rsMNzgJ1d5TQzdh/AOJGsxeeESp3m9YIWGLCgUvGTVoVLs0p68A=="
"version": "241213.2.0",
"resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-241213.2.0.tgz",
"integrity": "sha512-nfddejB9jxFSG+Uewf+zwATFi8F2CZEEgoHLoOj13egiBDoC7zMoxK1c5/Ycf3AGmGuwCgjpn3LWe0f4tKYbjw=="
},
"jsdom": {
"version": "11.12.0",
@@ -8351,7 +8351,7 @@
}
},
"mmjstool": {
"version": "github:mattermost/mattermost-utilities#b3e2e308b8b85469849a91c21958b46a89ab33ab",
"version": "github:mattermost/mattermost-utilities#ce99d7a9e82128a02fd36e44720a4aef2653810d",
"from": "github:mattermost/mattermost-utilities",
"dev": true,
"requires": {

View File

@@ -1,6 +1,6 @@
{
"name": "mattermost-mobile",
"version": "1.26.0",
"version": "1.26.1",
"description": "Mattermost Mobile with React Native",
"repository": "git@github.com:mattermost/mattermost-mobile.git",
"author": "Mattermost, Inc.",
@@ -23,7 +23,7 @@
"fuse.js": "3.4.5",
"intl": "1.2.5",
"jail-monkey": "2.3.0",
"jsc-android": "241213.1.0",
"jsc-android": "241213.2.0",
"mattermost-redux": "github:mattermost/mattermost-redux#6421d6ee52784c629a405d010047becbbf196c00",
"mime-db": "1.42.0",
"moment-timezone": "0.5.27",

View File

@@ -114,7 +114,7 @@ index 1b17cff..9efa98e 100644
#pragma mark - RCTSRWebSocketDelegate
diff --git a/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m b/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m
index a134d2e..e815938 100644
index a134d2e..e1d9988 100644
--- a/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m
+++ b/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m
@@ -231,7 +231,7 @@ @implementation RCTSRWebSocket
@@ -155,7 +155,44 @@ index a134d2e..e815938 100644
}
- (void)_RCTSR_commonInit;
@@ -518,6 +522,24 @@ - (void)_initializeStreams;
@@ -347,6 +351,36 @@ - (void)setReadyState:(RCTSRReadyState)aReadyState;
#endif
+- (SecIdentityRef) GetIdentityByName:(NSString *)name
+{
+ NSMutableDictionary * query = [[NSMutableDictionary alloc] init];
+
+ //Set up the invariant pieces of the query
+ [query setObject:(id)kSecMatchLimitAll forKey:(id)kSecMatchLimit];
+ [query setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnRef];
+ [query setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnData];
+ [query setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnAttributes];
+ [query setObject:(id)kSecClassIdentity forKey:(id)kSecClass];
+ [query setObject:name forKey:(id)kSecAttrLabel];
+
+ OSStatus resultCode = noErr;
+ CFTypeRef result = nil;
+ //Execute the query saving the results in items.
+ resultCode = SecItemCopyMatching((CFDictionaryRef)query, &result);
+ CFDictionaryRef item = (CFDictionaryRef)CFArrayGetValueAtIndex((CFArrayRef)result, 0);
+ if (item != nil) {
+ SecIdentityRef identity = nil;
+ CFTypeRef value;
+ if(CFDictionaryGetValueIfPresent(item, kSecValueRef, &value))
+ {
+ identity = (SecIdentityRef)value;
+ }
+
+ return identity;
+ }
+ return nil;
+}
+
- (void)open;
{
assert(_url);
@@ -518,6 +552,24 @@ - (void)_initializeStreams;
RCTLogInfo(@"SocketRocket: In debug mode. Allowing connection to any root cert");
#endif