Skip to content

Commit dbec252

Browse files
committed
Merge branch 'release/0.27.4/master'
2 parents ebae216 + dbdc541 commit dbec252

File tree

5 files changed

+33
-18
lines changed

5 files changed

+33
-18
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## Changes in 0.27.4 (2023-11-28)
2+
3+
🐛 Bugfixes
4+
5+
- Fix unhandled callback when the session is nil. ([#1833](https://github.com/matrix-org/matrix-ios-sdk/pull/1833))
6+
7+
18
## Changes in 0.27.3 (2023-10-04)
29

310
🐛 Bugfixes

MatrixSDK.podspec

Lines changed: 1 addition & 1 deletion
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.3"
4+
s.version = "0.27.4"
55
s.summary = "The iOS SDK to build apps compatible with Matrix (https://www.matrix.org)"
66

77
s.description = <<-DESC

MatrixSDK/Data/MXRoomState.m

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,31 @@ + (void)loadRoomStateFromStore:(id<MXStore>)store
120120
{
121121
[store stateOfRoom:roomId success:^(NSArray<MXEvent *> * _Nonnull stateEvents) {
122122
if (!stateEvents.count) {
123-
MXLogWarning(@"[MXRoomState] loadRoomStateFromStore(%@): No state events stored, loading from api", logId);
123+
MXLogWarning(@"[MXRoomState] loadRoomStateFromStore(%@): No state events stored, loading from API", logId);
124124

125-
[matrixSession.matrixRestClient stateOfRoom:roomId success:^(NSArray *JSONData) {
126-
NSArray<MXEvent *> *events = [MXEvent modelsFromJSON:JSONData];
127-
MXLogDebug(@"[MXRoomState] loadRoomStateFromStore(%@): Loaded %lu events from api", logId, events.count);
128-
129-
[roomState handleStateEvents:events];
130-
onComplete(roomState);
131-
} failure:^(NSError *error) {
132-
NSDictionary *details = @{
133-
@"log_id": logId ?: @"unknown",
134-
@"error": error ?: @"unknown"
135-
};
136-
MXLogErrorDetails(@"[MXRoomState] loadRoomStateFromStore: Failed to load any events from api", details);
137-
125+
if (!matrixSession)
126+
{
127+
MXLogError(@"[MXRoomState] loadRoomStateFromStore: Missing session, unable to load from API")
138128
onComplete(roomState);
139-
}];
129+
}
130+
else
131+
{
132+
[matrixSession.matrixRestClient stateOfRoom:roomId success:^(NSArray *JSONData) {
133+
NSArray<MXEvent *> *events = [MXEvent modelsFromJSON:JSONData];
134+
MXLogDebug(@"[MXRoomState] loadRoomStateFromStore(%@): Loaded %lu events from api", logId, events.count);
135+
136+
[roomState handleStateEvents:events];
137+
onComplete(roomState);
138+
} failure:^(NSError *error) {
139+
NSDictionary *details = @{
140+
@"log_id": logId ?: @"unknown",
141+
@"error": error ?: @"unknown"
142+
};
143+
MXLogErrorDetails(@"[MXRoomState] loadRoomStateFromStore: Failed to load any events from API", details);
144+
145+
onComplete(roomState);
146+
}];
147+
}
140148
} else {
141149
MXLogDebug(@"[MXRoomState] loadRoomStateFromStore(%@): Initializing with %lu state events", logId, stateEvents.count);
142150

MatrixSDK/MatrixSDKVersion.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616

1717
#import <Foundation/Foundation.h>
1818

19-
NSString *const MatrixSDKVersion = @"0.27.3";
19+
NSString *const MatrixSDKVersion = @"0.27.4";

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ SPEC CHECKSUMS:
7373

7474
PODFILE CHECKSUM: 1bf28f5a19566c567d265232f60ee19a3ae86ed3
7575

76-
COCOAPODS: 1.11.3
76+
COCOAPODS: 1.13.0

0 commit comments

Comments
 (0)