IM: Terms modal: Make computation of baseUrl more generic

This commit is contained in:
manuroe
2019-08-13 11:35:46 +02:00
parent ecfb4bac2c
commit a258907fea
3 changed files with 48 additions and 34 deletions
+12 -9
View File
@@ -539,19 +539,22 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
NSString *scalarToken;
MXJSONModelSetString(scalarToken, JSONResponse[@"scalar_token"])
config.scalarToken = scalarToken;
// Validate it (this mostly checks to see if the IM needs us to agree to some terms)
// TODO
// return this._checkToken(tokenObject);
self->configs[userId] = config;
[self saveConfigs];
// Validate it (this mostly checks to see if the IM needs us to agree to some terms)
MXHTTPOperation *operation3 = [self validateScalarToken:scalarToken forMXSession:mxSession complete:^(BOOL valid) {
if (success)
{
success(scalarToken);
}
if (success)
{
success(scalarToken);
}
} failure:failure];
[operation mutateTo:operation3];
} failure:^(NSError *error) {
NSLog(@"[WidgetManager] registerForScalarToken: Failed to register. Error: %@", error);