@@ -58,6 +58,7 @@ + (void)updatePost:(AbstractPost *)post withRemotePost:(RemotePost *)remotePost
5858 }
5959
6060 post.rawMetadata = [PostHelper makeRawMetadataFrom: remotePost];
61+ post.foreignID = [PostHelper getForeignIDFor: remotePost];
6162
6263 post.autosaveTitle = remotePost.autosave .title ;
6364 post.autosaveExcerpt = remotePost.autosave .excerpt ;
@@ -68,7 +69,6 @@ + (void)updatePost:(AbstractPost *)post withRemotePost:(RemotePost *)remotePost
6869 if ([post isKindOfClass: [Page class ]]) {
6970 Page *pagePost = (Page *)post;
7071 pagePost.parentID = remotePost.parentID ;
71- pagePost.foreignID = remotePost.foreignID ;
7272 } else if ([post isKindOfClass: [Post class ]]) {
7373 Post *postPost = (Post *)post;
7474 postPost.commentsStatus = remotePost.commentsStatus ;
@@ -100,7 +100,6 @@ + (void)updatePost:(AbstractPost *)post withRemotePost:(RemotePost *)remotePost
100100 publicizeMessage = [publicizeMessageDictionary stringForKey: @" value" ];
101101 publicizeMessageID = [publicizeMessageDictionary stringForKey: @" id" ];
102102 }
103- postPost.foreignID = remotePost.foreignID ;
104103 postPost.publicID = publicID;
105104 postPost.publicizeMessage = publicizeMessage;
106105 postPost.publicizeMessageID = publicizeMessageID;
@@ -185,7 +184,7 @@ + (NSArray *)mergePosts:(NSArray <RemotePost *> *)remotePosts
185184 for (RemotePost *remotePost in remotePosts) {
186185 AbstractPost *post = [blog lookupPostWithID: remotePost.postID inContext: context];
187186 if (post == nil ) {
188- NSUUID *foreignID = remotePost. foreignID ;
187+ NSUUID *foreignID = [PostHelper getForeignIDFor: remotePost] ;
189188 if (foreignID != nil ) {
190189 post = [blog lookupLocalPostWithForeignID: foreignID inContext: context];
191190 }
0 commit comments