This repository was archived by the owner on Sep 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,12 @@ import Foundation
3737 /// Features available for the current blog's plan.
3838 public var planActiveFeatures = [ String] ( )
3939
40- /// Indicates whether it's a jetpack site, or not .
40+ /// Indicates whether the jetpack connection is active .
4141 public var jetpack : Bool = false
4242
43+ /// Indicates whether it's a Jetpack connected site.
44+ public var jetpackConnection : Bool = false
45+
4346 /// Boolean indicating whether the current user has Admin privileges, or not.
4447 public var isAdmin : Bool = false
4548
@@ -70,6 +73,7 @@ import Foundation
7073 self . url = json. string ( forKey: " URL " ) ?? " "
7174 self . xmlrpc = json. string ( forKeyPath: " meta.links.xmlrpc " )
7275 self . jetpack = json. number ( forKey: " jetpack " ) ? . boolValue ?? false
76+ self . jetpackConnection = json. number ( forKey: " jetpack_connection " ) ? . boolValue ?? false
7377 self . icon = json. string ( forKeyPath: " icon.img " )
7478 self . capabilities = json. object ( forKey: " capabilities " ) as? [ String : Bool ] ?? [ : ]
7579 self . isAdmin = json. number ( forKeyPath: " capabilities.manage_options " ) ? . boolValue ?? false
Original file line number Diff line number Diff line change @@ -391,7 +391,16 @@ - (NSArray *)remoteBlogsFromJSONArray:(NSArray *)jsonBlogs
391391 // Exclude deleted sites from query result, since the app does not handle deleted sites properly.
392392 // I tried to use query arguments `site_visibility=visible` and `site_activity=active`, but neither excludes
393393 // deleted sites.
394- return !blog.isDeleted ;
394+ if (blog.isDeleted ) {
395+ return false ;
396+ }
397+
398+ // Exclude sites that are connected via Jetpack, but without an active Jetpack connection.
399+ if (blog.jetpackConnection && !blog.jetpack ) {
400+ return false ;
401+ }
402+
403+ return true ;
395404 }];
396405}
397406
You can’t perform that action at this time.
0 commit comments