Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ let package = Package(
targets: [
.binaryTarget(
name: "WordPressKit",
url: "https://github.com/user-attachments/files/18570063/WordPressKit.zip",
checksum: "fc25d3065e80af713dac970db7ed89ff37e4cc98afc98b6a2ecf7b47b2ddd0c1"
url: "https://github.com/user-attachments/files/19034191/WordPressKit.zip",
checksum: "34f108cba86b5e4334d1c9af79946dbb8b665e270bdd14bc8f7bc0ba7a898583"
),
]
)
2 changes: 2 additions & 0 deletions Sources/WordPressKit/Models/RemoteReaderPost.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
@property (nonatomic, strong) NSNumber *commentCount;
@property (nonatomic) BOOL commentsOpen;
@property (nonatomic, strong) NSString *featuredImage;
@property (nonatomic, strong) NSString *autoSuggestedFeaturedImage;
@property (nonatomic, strong) NSString *suitableImageFromPostContent;
@property (nonatomic, strong) NSNumber *feedID;
@property (nonatomic, strong) NSNumber *feedItemID;
@property (nonatomic, strong) NSString *globalID;
Expand Down
2 changes: 2 additions & 0 deletions Sources/WordPressKit/Models/RemoteReaderPost.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ - (instancetype)initWithDictionary:(NSDictionary *)dict;
self.content = [self postContentFromPostDictionary:dict];
self.date_created_gmt = [self stringOrEmptyString:[dict stringForKey:PostRESTKeyDate]];
self.featuredImage = [self featuredImageFromPostDictionary:dict];
self.autoSuggestedFeaturedImage = [self sanitizeFeaturedImageString:[self featuredMediaImageFromPostDictionary:dict]];
self.suitableImageFromPostContent = [self sanitizeFeaturedImageString:[self suitableImageFromPostContent:dict]];
self.feedID = [dict numberForKey:PostRESTKeyFeedID];
self.feedItemID = [dict numberForKey:PostRESTKeyFeedItemID];
self.globalID = [self stringOrEmptyString:[dict stringForKey:PostRESTKeyGlobalID]];
Expand Down
2 changes: 1 addition & 1 deletion Sources/WordPressKit/Services/CommentServiceRemoteREST.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
- (void)updateCommentWithID:(NSNumber * _Nonnull)commentID
content:(NSString * _Nonnull)content
success:(void (^ _Nullable)(void))success
success:(void (^ _Nullable)(RemoteComment * _Nullable comment))success
failure:(void (^ _Nullable)(NSError * _Nullable error))failure;

/**
Expand Down
19 changes: 10 additions & 9 deletions Sources/WordPressKit/Services/CommentServiceRemoteREST.m
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ - (void)syncHierarchicalCommentsForPost:(NSNumber *)postID

- (void)updateCommentWithID:(NSNumber *)commentID
content:(NSString *)content
success:(void (^)(void))success
success:(void (^)(RemoteComment *comment))success
failure:(void (^)(NSError *error))failure
{
NSString *path = [NSString stringWithFormat:@"sites/%@/comments/%@", self.siteID, commentID];
Expand All @@ -260,14 +260,15 @@ - (void)updateCommentWithID:(NSNumber *)commentID
[self.wordPressComRESTAPI post:requestUrl
parameters:parameters
success:^(id responseObject, NSHTTPURLResponse *httpResponse) {
if (success) {
success();
}
} failure:^(NSError *error, NSHTTPURLResponse *httpResponse) {
if (failure) {
failure(error);
}
}];
RemoteComment *comment = [self remoteCommentFromJSONDictionary:responseObject];
if (success) {
success(comment);
}
} failure:^(NSError *error, NSHTTPURLResponse *httpResponse) {
if (failure) {
failure(error);
}
}];
}

- (void)replyToPostWithID:(NSNumber *)postID
Expand Down