Skip to content

Commit 28ef121

Browse files
committed
Merge branch 'release/0.27.9/master'
2 parents 11aa1f4 + ff6bc06 commit 28ef121

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

CHANGES.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Changes in 0.27.9 (2024-06-13)
2+
3+
No significant changes.
4+
5+
16
## Changes in 0.27.8 (2024-05-29)
27

38
🙌 Improvements

MatrixSDK.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

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

77
s.description = <<-DESC

MatrixSDK/MXRestClient.h

+15
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,21 @@ NS_REFINED_FOR_SWIFT;
15831583
success:(void (^)(void))success
15841584
failure:(void (^)(NSError *error))failure;
15851585

1586+
/**
1587+
Report a room.
1588+
1589+
@param roomId the id of the room.
1590+
@param reason the redaction reason (optional).
1591+
1592+
@param success A block object called when the operation succeeds.
1593+
@param failure A block object called when the operation fails.
1594+
1595+
@return a MXHTTPOperation instance.
1596+
*/
1597+
-(MXHTTPOperation *)reportRoom:(NSString *)roomId
1598+
reason:(NSString *)reason
1599+
success:(void (^)(void))success
1600+
failure:(void (^)(NSError *))failure;
15861601

15871602
/**
15881603
Report an event.

MatrixSDK/MXRestClient.m

+23
Original file line numberDiff line numberDiff line change
@@ -3091,6 +3091,29 @@ - (MXHTTPOperation*)redactEvent:(NSString*)eventId
30913091
}
30923092
failure:^(NSError *error) {
30933093
MXStrongifyAndReturnIfNil(self);
3094+
[self dispatchFailure:error inBlock:failure];
3095+
}];
3096+
}
3097+
3098+
-(MXHTTPOperation *)reportRoom:(NSString *)roomId
3099+
reason:(NSString *)reason
3100+
success:(void (^)(void))success
3101+
failure:(void (^)(NSError *))failure
3102+
{
3103+
NSString *path = [NSString stringWithFormat:@"%@/org.matrix.msc4151/rooms/%@/report", kMXAPIPrefixPathUnstable, roomId];
3104+
3105+
NSDictionary *parameters = @{ @"reason": reason.length > 0 ? reason : @"" };
3106+
3107+
MXWeakify(self);
3108+
return [httpClient requestWithMethod:@"POST"
3109+
path:path
3110+
parameters:parameters
3111+
success:^(NSDictionary *JSONResponse) {
3112+
MXStrongifyAndReturnIfNil(self);
3113+
[self dispatchSuccess:success];
3114+
}
3115+
failure:^(NSError *error) {
3116+
MXStrongifyAndReturnIfNil(self);
30943117
[self dispatchFailure:error inBlock:failure];
30953118
}];
30963119
}

0 commit comments

Comments
 (0)