Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions Modules/Sources/WordPressKitObjC/AccountServiceRemoteREST.m
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,19 @@ - (void)getBlogsWithParameters:(NSDictionary *)parameters
{
NSString *requestUrl = [self pathForEndpoint:@"me/sites"
withVersion:WordPressComRESTAPIVersion_1_2];
// site_activity=active filters out many sites that are not longer available.
//
// For example, if you have a self-hosted site that's connected to a WP.com account, and later the site domain expires
// and couldn't be accessed, we don't want to show this site in the app. These sites are filtered out by the
// `site_activity=active` parameter.
//
// For reference, this paramter is hard-coded in "My Sites" in calyspo:
// https://github.com/Automattic/wp-calypso/blob/64806d21520e5489b30fbabf04e2f427a3ad392c/packages/api-core/src/me-sites/fetchers.ts#L30
if (parameters[@"site_activity"] == nil) {
NSMutableDictionary *updated = [NSMutableDictionary dictionaryWithDictionary:parameters];
updated[@"site_activity"] = @"active";
parameters = updated;
}
[self.wordPressComRESTAPI get:requestUrl
parameters:parameters
success:^(id responseObject, NSHTTPURLResponse *httpResponse) {
Expand Down Expand Up @@ -417,11 +430,6 @@ - (NSArray *)remoteBlogsFromJSONArray:(NSArray *)jsonBlogs
return false;
}

// Exclude sites that are connected via Jetpack, but without an active Jetpack connection.
if (blog.jetpackConnection && !blog.jetpack) {
return false;
}

return true;
}];
}
Expand Down
2 changes: 2 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* [*] Add permalink preview in the slug editor and make other improvements [#24949]
* [*] Add "Taxonomies" to Site Settings [#24955]
* [*] Update "Categories" picker to indicate multiple selection [#24952]
* [*] Fix a bug where the app can't access some Jetpack connected sites [#24976]
* [*] Add support for editing custom taxonomy terms from "Post Settings" [#24964]

26.4
-----
Expand Down