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.
This commit is contained in:
manuroe 2018-12-27 11:56:00 +01:00
parent 6f98b3f646
commit bf418edf03
2 changed files with 12 additions and 14 deletions

View file

@ -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)
===============================================

View file

@ -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;
}
}