Skip to content

Commit

Permalink
Improved server discovery (now looks for html link tag for profile an…
Browse files Browse the repository at this point in the history
…d reads canonical server url from profile response).
  • Loading branch information
followben committed Oct 5, 2012
1 parent 194183f commit c646359
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Example/TentStatusExample/AccountViewController.m
Expand Up @@ -69,21 +69,21 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField
[textField resignFirstResponder];

if ([self.entityURL isEquivalent:entityURL] &&
[[TentStatusClient sharedClient] isAuthorizedWithTentServer:self.tentServerURL]) {
[[TentStatusClient sharedClient] isAuthorizedForTentServer:self.tentServerURL]) {
[self showTimeline];
return YES;
}

self.entityURL = entityURL;

__weak AccountViewController *weakSelf = self;
[[TentStatusClient sharedClient] discoverTentServerForEntity:self.entityURL success:^(NSURL *tentServerURL) {
[[TentStatusClient sharedClient] discoverTentServerForEntityURL:self.entityURL success:^(NSURL *tentServerURL) {
if ([weakSelf.tentServerURL isEquivalent:tentServerURL] &&
[[TentStatusClient sharedClient] isAuthorizedWithTentServer:weakSelf.tentServerURL]) {
[[TentStatusClient sharedClient] isAuthorizedForTentServer:weakSelf.tentServerURL]) {
[weakSelf showTimeline];
} else {
weakSelf.tentServerURL = tentServerURL;
[[TentStatusClient sharedClient] authorizeWithTentServer:weakSelf.tentServerURL];
[[TentStatusClient sharedClient] authorizeForTentServerURL:weakSelf.tentServerURL];
}
} failure:nil];

Expand Down

0 comments on commit c646359

Please sign in to comment.