Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.27.9 #1860

Merged
merged 5 commits into from
Jun 13, 2024
Merged
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
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Changes in 0.27.9 (2024-06-13)

No significant changes.


## Changes in 0.27.8 (2024-05-29)

🙌 Improvements
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "MatrixSDK"
s.version = "0.27.8"
s.version = "0.27.9"
s.summary = "The iOS SDK to build apps compatible with Matrix (https://www.matrix.org)"

s.description = <<-DESC
Expand Down
15 changes: 15 additions & 0 deletions MatrixSDK/MXRestClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,21 @@ NS_REFINED_FOR_SWIFT;
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure;

/**
Report a room.

@param roomId the id of the room.
@param reason the redaction reason (optional).

@param success A block object called when the operation succeeds.
@param failure A block object called when the operation fails.

@return a MXHTTPOperation instance.
*/
-(MXHTTPOperation *)reportRoom:(NSString *)roomId
reason:(NSString *)reason
success:(void (^)(void))success
failure:(void (^)(NSError *))failure;

/**
Report an event.
Expand Down
23 changes: 23 additions & 0 deletions MatrixSDK/MXRestClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -3091,6 +3091,29 @@ - (MXHTTPOperation*)redactEvent:(NSString*)eventId
}
failure:^(NSError *error) {
MXStrongifyAndReturnIfNil(self);
[self dispatchFailure:error inBlock:failure];
}];
}

-(MXHTTPOperation *)reportRoom:(NSString *)roomId
reason:(NSString *)reason
success:(void (^)(void))success
failure:(void (^)(NSError *))failure
{
NSString *path = [NSString stringWithFormat:@"%@/org.matrix.msc4151/rooms/%@/report", kMXAPIPrefixPathUnstable, roomId];

NSDictionary *parameters = @{ @"reason": reason.length > 0 ? reason : @"" };

MXWeakify(self);
return [httpClient requestWithMethod:@"POST"
path:path
parameters:parameters
success:^(NSDictionary *JSONResponse) {
MXStrongifyAndReturnIfNil(self);
[self dispatchSuccess:success];
}
failure:^(NSError *error) {
MXStrongifyAndReturnIfNil(self);
[self dispatchFailure:error inBlock:failure];
}];
}
Expand Down
Loading