From bf418edf03635de6fe6a8a0ba6cdbd5eb1940f3b Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 27 Dec 2018 11:56:00 +0100 Subject: [PATCH] BF: Registration: email or phone number is no more skippable #2140 Note: There is no more conditions linked to kMXLoginFlowTypeRecaptcha in the code, which makes it look more flexible. --- CHANGES.rst | 9 +++++++++ .../Authentication/Views/AuthInputsView.m | 17 +++-------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index c30785583..0b6e26b73 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +Changes in 0.7.9 (2018-12-) +=============================================== + +Improvements: +* Upgrade MatrixKit version (v0.9.2). + +Bug fix: +* Registration: email or phone number is no more skippable (#2140). + Changes in 0.7.8 (2018-12-12) =============================================== diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.m b/Riot/Modules/Authentication/Views/AuthInputsView.m index 04a994521..2848bea43 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.m +++ b/Riot/Modules/Authentication/Views/AuthInputsView.m @@ -965,21 +965,10 @@ // Check whether an account may be created without third-party identifiers. for (MXLoginFlow *loginFlow in currentSession.flows) { - if ([loginFlow.stages indexOfObject:kMXLoginFlowTypeDummy] != NSNotFound || [loginFlow.type isEqualToString:kMXLoginFlowTypeDummy]) + if ([loginFlow.stages indexOfObject:kMXLoginFlowTypeEmailIdentity] == NSNotFound + && [loginFlow.stages indexOfObject:kMXLoginFlowTypeEmailCode] == NSNotFound) { - // The dummy flow is supported, the 3pid are then optional. - return NO; - } - - if ((loginFlow.stages.count == 1 && [loginFlow.stages[0] isEqualToString:kMXLoginFlowTypeRecaptcha]) || [loginFlow.type isEqualToString:kMXLoginFlowTypeRecaptcha]) - { - // The recaptcha flow is supported alone, the 3pids are then optional. - return NO; - } - - if ((loginFlow.stages.count == 1 && [loginFlow.stages[0] isEqualToString:kMXLoginFlowTypePassword]) || [loginFlow.type isEqualToString:kMXLoginFlowTypePassword]) - { - // The password flow is supported alone, the 3pids are then optional. + // There is a flow with no 3pids return NO; } }