diff --git a/Podfile b/Podfile index 576fce479..2af0767d6 100644 --- a/Podfile +++ b/Podfile @@ -8,7 +8,7 @@ target "Riot" do # Different flavours of pods to MatrixKit # The tagged version on which this version of Riot has been built -pod 'MatrixKit', '0.4.8' +#pod 'MatrixKit', '0.4.8' # The lastest release available on the CocoaPods repository #pod 'MatrixKit' @@ -19,8 +19,8 @@ pod 'MatrixKit', '0.4.8' # The one used for developing both MatrixSDK and MatrixKit # Note that MatrixSDK must be cloned into a folder called matrix-ios-sdk next to the MatrixKit folder -#pod 'MatrixKit', :path => '../matrix-ios-kit/MatrixKit.podspec' -#pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec' +pod 'MatrixKit', :path => '../matrix-ios-kit/MatrixKit.podspec' +pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec' pod 'GBDeviceInfo', '~> 4.2.2' diff --git a/Podfile.lock b/Podfile.lock index 1bd43ccd5..6cfd1e807 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -59,11 +59,18 @@ PODS: DEPENDENCIES: - GBDeviceInfo (~> 4.2.2) - GoogleAnalytics - - MatrixKit (= 0.4.8) + - MatrixKit (from `../matrix-ios-kit/MatrixKit.podspec`) + - MatrixSDK (from `../matrix-ios-sdk/MatrixSDK.podspec`) - OLMKit - Realm (~> 2.1.1) - WebRTC (= 56.10.15101) +EXTERNAL SOURCES: + MatrixKit: + :path: ../matrix-ios-kit/MatrixKit.podspec + MatrixSDK: + :path: ../matrix-ios-sdk/MatrixSDK.podspec + SPEC CHECKSUMS: AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 cmark: ec0275215b504780287b6fca360224e384368af8 @@ -79,6 +86,6 @@ SPEC CHECKSUMS: Realm: efe855f4d977c8ce5a82d3116d9f1ff155a6550c WebRTC: 116e2a81290a8551d67dd2e471b94803a5bba813 -PODFILE CHECKSUM: 91c442670cd4f060b24d95fa446287f313ec0faa +PODFILE CHECKSUM: 081aa5620b64db528870aacfd7a3696b0757236b COCOAPODS: 1.2.0 diff --git a/Riot/Views/Authentication/AuthInputsView.m b/Riot/Views/Authentication/AuthInputsView.m index db11c23c3..19badc7d4 100644 --- a/Riot/Views/Authentication/AuthInputsView.m +++ b/Riot/Views/Authentication/AuthInputsView.m @@ -585,8 +585,11 @@ { currentSession.completed = completedStages; + BOOL isMSISDNFlowCompleted = self.isMSISDNFlowCompleted; + BOOL isEmailFlowCompleted = self.isEmailIdentityFlowCompleted; + // Check the supported use cases - if ([completedStages indexOfObject:kMXLoginFlowTypeMSISDN] != NSNotFound && self.isThirdPartyIdentifierPending) + if (isMSISDNFlowCompleted && self.isThirdPartyIdentifierPending) { NSLog(@"[AuthInputsView] Prepare a new third-party stage"); @@ -595,7 +598,7 @@ return; } - else if (([completedStages indexOfObject:kMXLoginFlowTypeMSISDN] != NSNotFound || [completedStages indexOfObject:kMXLoginFlowTypeEmailIdentity] != NSNotFound) && self.isRecaptchaFlowRequired) + else if ((isMSISDNFlowCompleted || isEmailFlowCompleted) && self.isRecaptchaFlowRequired) { NSLog(@"[AuthInputsView] Display reCaptcha stage"); @@ -619,8 +622,8 @@ @"auth": @{@"session": currentSession.session, @"response": response, @"type": kMXLoginFlowTypeRecaptcha}, @"username": self.userLoginTextField.text, @"password": self.passWordTextField.text, - @"bind_msisdn": [NSNumber numberWithBool:self.isMSISDNFlowCompleted], - @"bind_email": @(YES) + @"bind_msisdn": [NSNumber numberWithBool:isMSISDNFlowCompleted], + @"bind_email": [NSNumber numberWithBool:isEmailFlowCompleted] }; }