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 +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
3939 case includeWordPressDotCom
4040 case onlyWordPressDotCom
4141 case wordPressDotComAndDotBlogSubdomains
42+ case whitelistedTopLevelDomains( [ String ] )
4243
4344 fileprivate func parameters( ) -> [ String : AnyObject ] {
4445 switch self {
@@ -54,6 +55,8 @@ public class DomainsServiceRemote: ServiceRemoteWordPressComREST {
5455 " vendor " : " dot " as AnyObject ,
5556 " only_wordpressdotcom " : true as AnyObject ,
5657 " include_wordpressdotcom " : true as AnyObject ]
58+ case . whitelistedTopLevelDomains( let whitelistedTLDs) :
59+ return [ " tlds " : whitelistedTLDs. joined ( separator: " , " ) as AnyObject ]
5760 }
5861 }
5962 }
Original file line number Diff line number Diff line change @@ -438,8 +438,9 @@ - (RemotePost *)remotePostFromJSONDictionary:(NSDictionary *)jsonPost {
438438 post.pathForDisplayImage = post.postThumbnailPath ;
439439 } else {
440440 // parse contents for a suitable image
441- if (!post.pathForDisplayImage ) {
442- post.pathForDisplayImage = [DisplayableImageHelper searchPostContentForImageToDisplay: post.content];
441+ post.pathForDisplayImage = [DisplayableImageHelper searchPostContentForImageToDisplay: post.content];
442+ if ([post.pathForDisplayImage length ] == 0 ) {
443+ post.pathForDisplayImage = [DisplayableImageHelper searchPostAttachmentsForImageToDisplay: [jsonPost dictionaryForKey: @" attachments" ] existingInContent: post.content];
443444 }
444445 }
445446
You can’t perform that action at this time.
0 commit comments