Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all 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/19034071/WordPressKit.zip",
checksum: "56b34223272bd84b4530591889b274f6fc4781b62abe9b0dc0e6ae2f3c364442"
),
]
)
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