mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Fix phone number validation through custom URL (#5527)
* Fix phone number validation through custom URL * Rename msisdnSubmissionHttpClient Co-authored-by: Arnaud Ringenbach <arnaud.ringenbach@niji.fr>
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
@property (nonatomic) NSString *sid;
|
||||
@property (nonatomic) MXIdentityService *identityService;
|
||||
@property (nonatomic) NSString *submitUrl;
|
||||
/**
|
||||
HTTP client dedicated to sending MSISDN token to custom URLs.
|
||||
*/
|
||||
@property (nonatomic, strong) MXHTTPClient *msisdnSubmissionHttpClient;
|
||||
|
||||
@end
|
||||
|
||||
@@ -255,14 +259,23 @@
|
||||
@"token": token
|
||||
};
|
||||
|
||||
MXHTTPClient *httpClient = [[MXHTTPClient alloc] initWithBaseURL:nil andOnUnrecognizedCertificateBlock:nil];
|
||||
return [httpClient requestWithMethod:@"POST"
|
||||
path:url
|
||||
parameters:parameters
|
||||
success:^(NSDictionary *JSONResponse) {
|
||||
success();
|
||||
}
|
||||
failure:failure];
|
||||
self.msisdnSubmissionHttpClient = [[MXHTTPClient alloc] initWithBaseURL:nil andOnUnrecognizedCertificateBlock:nil];
|
||||
|
||||
MXWeakify(self);
|
||||
return [self.msisdnSubmissionHttpClient requestWithMethod:@"POST"
|
||||
path:url
|
||||
parameters:parameters
|
||||
success:^(NSDictionary *JSONResponse) {
|
||||
success();
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
self.msisdnSubmissionHttpClient = nil;
|
||||
}
|
||||
failure:^(NSError *error) {
|
||||
failure(error);
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
self.msisdnSubmissionHttpClient = nil;
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)add3PIDToUser:(BOOL)bind
|
||||
|
||||
Reference in New Issue
Block a user