From d2b017fbc631882f4e5181308c728c298ed08d9b Mon Sep 17 00:00:00 2001 From: "Tanner W. Stokes" Date: Thu, 15 Jul 2021 08:46:15 -0400 Subject: [PATCH] Only extract author information if the user can query for authors. --- WordPress/Classes/Services/PostService.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WordPress/Classes/Services/PostService.m b/WordPress/Classes/Services/PostService.m index 33027f305733..6751efcbd2fd 100644 --- a/WordPress/Classes/Services/PostService.m +++ b/WordPress/Classes/Services/PostService.m @@ -54,8 +54,8 @@ - (Post *)createPostForBlog:(Blog *)blog { post.postType = Post.typeDefaultIdentifier; BlogAuthor *author = [blog getAuthorWithId:blog.userID]; - post.authorID = author.userID ?: blog.account.userID; - post.author = author.displayName ?: blog.account.displayName; + post.authorID = author.userID; + post.author = author.displayName; [blog.managedObjectContext obtainPermanentIDsForObjects:@[post] error:nil]; NSAssert(![post.objectID isTemporaryID], @"The new post for this blog must have a permanent ObjectID"); @@ -77,8 +77,8 @@ - (Page *)createPageForBlog:(Blog *)blog { page.remoteStatus = AbstractPostRemoteStatusSync; BlogAuthor *author = [blog getAuthorWithId:blog.userID]; - page.authorID = author.userID ?: blog.account.userID; - page.author = author.displayName ?: blog.account.displayName; + page.authorID = author.userID; + page.author = author.displayName; [blog.managedObjectContext obtainPermanentIDsForObjects:@[page] error:nil]; NSAssert(![page.objectID isTemporaryID], @"The new page for this blog must have a permanent ObjectID");