Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ extension ReaderPost {
permaLink = remotePost.permalink
postID = remotePost.postID
postTitle = remotePost.postTitle
mt_excerpt = remotePost.excerpt?.nonEmptyString()
railcar = remotePost.railcar
score = remotePost.score
siteID = remotePost.siteID
Expand Down
1 change: 1 addition & 0 deletions Modules/Sources/WordPressKitObjC/RemoteReaderPost.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ - (instancetype)initWithDictionary:(NSDictionary *)dict;
self.sortDate = [self sortDateFromPostDictionary:dict];
self.sortRank = @(self.sortDate.timeIntervalSinceReferenceDate);
self.status = [self stringOrEmptyString:[dict stringForKey:PostRESTKeyStatus]];
self.excerpt = [self stringOrEmptyString:[dict stringForKey:PostRESTKeyExcerpt]];
self.summary = [self postSummaryFromPostDictionary:dict orPostContent:self.content];
self.tags = [self tagsFromPostDictionary:dict];
self.isSharingEnabled = [[dict numberForKey:PostRESTKeySharingEnabled] boolValue];
Expand Down
2 changes: 2 additions & 0 deletions Modules/Sources/WordPressKitObjC/include/RemoteReaderPost.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong, nullable) NSNumber *siteID;
@property (nonatomic, strong, nullable) NSDate *sortDate;
@property (nonatomic, strong, nullable) NSNumber *sortRank;
/// - warning: It may still contain auto-generated excerpts, but they are not automatically trimmed like `summary`.
@property (nonatomic, strong, nullable) NSString *excerpt;
@property (nonatomic, strong, nullable) NSString *summary;
@property (nonatomic, strong, nullable) NSString *tags;
@property (nonatomic) BOOL isLikesEnabled;
Expand Down
Loading