Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login: Handle well-known data in the login response #640

Merged
merged 11 commits into from
Mar 1, 2019
Merged

Conversation

manuroe
Copy link
Contributor

@manuroe manuroe commented Feb 28, 2019

MXCredentials is a new separate data model that allows to manage well-known data in one place.

The PR has these 2 main changes

Other changes is about factorisation to use a central MXCredentials object.

@@ -575,7 +553,7 @@ - (MXHTTPOperation *)loginWithLoginType:(NSString *)loginType username:(NSString

- (NSString*)loginFallback;
{
return [[NSURL URLWithString:@"/_matrix/static/client/login/" relativeToURL:[NSURL URLWithString:homeserver]] absoluteString];
return [[NSURL URLWithString:@"/_matrix/static/client/login/" relativeToURL:[NSURL URLWithString:self.credentials.homeServer]] absoluteString];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check self.credentials.homeServer nullability as NSURL URLWithString: wait a nonnull string.

@@ -2780,7 +2758,7 @@ - (MXHTTPOperation*)add3PID:(NSString*)sid
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure
{
NSURL *identityServerURL = [NSURL URLWithString:_identityServer];
NSURL *identityServerURL = [NSURL URLWithString:self.credentials.identityServer];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark as above check self.credentials.identityServer nullability.

@manuroe manuroe merged commit 435f062 into develop Mar 1, 2019
@manuroe manuroe deleted the riot_2298 branch March 1, 2019 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants