Skip to content

Commit 75480e6

Browse files
committed
Merge branch 'release/0.23.2/master'
2 parents f041bdc + 708822e commit 75480e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+494
-96
lines changed

CHANGES.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## Changes in 0.23.2 (2022-04-05)
2+
3+
🙌 Improvements
4+
5+
- Room: Return room identifier and known servers when resolving alias ([#4858](https://github.com/vector-im/element-ios/issues/4858))
6+
- MXRestClient: Use the stable hierarchy endpoint from MSC2946 ([#5144](https://github.com/vector-im/element-ios/issues/5144))
7+
- MXPublicRoom: added implementation for JSONDictionary ([#5953](https://github.com/vector-im/element-ios/issues/5953))
8+
9+
🐛 Bugfixes
10+
11+
- MXEventListener/MXRoomSummary: Fix retain cycles ([#5058](https://github.com/vector-im/element-ios/issues/5058))
12+
- Sync Spaces order with web ([#5134](https://github.com/vector-im/element-ios/issues/5134))
13+
- VoIP: Recreate CXProvider if a call cannot be hung up ([#5189](https://github.com/vector-im/element-ios/issues/5189))
14+
- MXThreadingService: Apply edits on thread root and latest events of a thread list. ([#5845](https://github.com/vector-im/element-ios/issues/5845))
15+
- MXThread: Fix redacted events & fix undecrypted events. ([#5877](https://github.com/vector-im/element-ios/issues/5877))
16+
- Room: Do not commit to file store after typing a single character ([#5906](https://github.com/vector-im/element-ios/issues/5906))
17+
- Move `handleRoomKeyEvent` logic back to `MXSession`. ([#5938](https://github.com/vector-im/element-ios/issues/5938))
18+
- MXSuggestedRoomListDataFetcher: Spaces shouldn't be displayed as suggested rooms ([#5978](https://github.com/vector-im/element-ios/issues/5978))
19+
20+
⚠️ API Changes
21+
22+
- Location sharing: Add new event asset type for pin drop location sharing ([#5858](https://github.com/vector-im/element-ios/issues/5858))
23+
24+
125
## Changes in 0.23.1 (2022-03-28)
226

327
🙌 Improvements

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.23.1"
4+
s.version = "0.23.2"
55
s.summary = "The iOS SDK to build apps compatible with Matrix (https://www.matrix.org)"
66

77
s.description = <<-DESC

MatrixSDK.xcodeproj/project.pbxproj

Lines changed: 40 additions & 1 deletion
Large diffs are not rendered by default.

MatrixSDK/Contrib/Swift/MXRestClient.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,17 +1665,17 @@ public extension MXRestClient {
16651665
}
16661666

16671667
/**
1668-
Get the room ID corresponding to this room alias
1669-
1668+
Resolve given room alias to a room identifier and a list of servers aware of this identifier
1669+
16701670
- parameters:
16711671
- roomAlias: the alias of the room to look for.
16721672
- completion: A block object called when the operation completes.
1673-
- response: Provides the the ID of the room on success.
1674-
1673+
- response: Provides a resolution object containing the room ID and a list of servers
1674+
16751675
- returns: a `MXHTTPOperation` instance.
16761676
*/
1677-
@nonobjc @discardableResult func roomId(forRoomAlias roomAlias: String, completion: @escaping (_ response: MXResponse<String>) -> Void) -> MXHTTPOperation {
1678-
return __roomID(forRoomAlias: roomAlias, success: currySuccess(completion), failure: curryFailure(completion))
1677+
@nonobjc @discardableResult func resolveRoomAlias(_ roomAlias: String, completion: @escaping (_ response: MXResponse<MXRoomAliasResolution>) -> Void) -> MXHTTPOperation {
1678+
return __resolveRoomAlias(roomAlias, success: currySuccess(completion), failure: curryFailure(completion))
16791679
}
16801680

16811681
// Mark: - Media Repository API
@@ -1842,7 +1842,7 @@ public extension MXRestClient {
18421842

18431843
- returns: a `MXHTTPOperation` instance.
18441844
*/
1845-
@nonobjc @discardableResult func sendDirectToDevice(eventType: String, contentMap: MXUsersDevicesMap<NSDictionary>, txnId: String, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> MXHTTPOperation {
1845+
@nonobjc @discardableResult func sendDirectToDevice(eventType: String, contentMap: MXUsersDevicesMap<NSDictionary>, txnId: String?, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> MXHTTPOperation {
18461846
return __send(toDevice: eventType, contentMap: contentMap, txnId: txnId, success: currySuccess(completion), failure: curryFailure(completion))
18471847
}
18481848

MatrixSDK/Crypto/Algorithms/Megolm/MXMegolmDecryption.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#import "MXCryptoAlgorithms.h"
2525
#import "MXCrypto_Private.h"
2626
#import "MXTools.h"
27+
#import "MatrixSDKSwiftHeader.h"
2728

2829
@interface MXMegolmDecryption ()
2930
{
@@ -146,7 +147,8 @@ - (MXEventDecryptionResult *)decryptEvent:(MXEvent*)event inTimeline:(NSString*)
146147

147148
result.error = olmError;
148149
}
149-
150+
151+
[crypto.mxSession.eventStreamService dispatchLiveEventDecryptionAttemptedWithEvent:event result:result];
150152
return result;
151153
}
152154

MatrixSDK/Crypto/MXCrypto.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
#import "MXDeviceListResponse.h"
5353

54+
#import "MatrixSDKSwiftHeader.h"
5455
/**
5556
The store to use for crypto.
5657
*/

MatrixSDK/Data/MXEventListener.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ typedef void (^MXOnEvent)(MXEvent *event, MXTimelineDirection direction, id _Nul
5151
*/
5252
- (void)notify:(MXEvent*)event direction:(MXTimelineDirection)direction andCustomObject:(nullable id)customObject;
5353

54-
@property (nonatomic, readonly) id sender;
54+
@property (nonatomic, weak, readonly) id sender;
5555
@property (nonatomic, nullable, readonly) NSArray<MXEventTypeString>* eventTypes;
5656
@property (nonatomic, readonly) MXOnEvent listenerBlock;
5757

MatrixSDK/Data/MXRoom.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#import "MXCall.h"
4040
#import "MXEventTimeline.h"
4141
#import "MXEventsEnumerator.h"
42+
#import "MXEventContentLocation.h"
4243
#import "MXCryptoConstants.h"
4344
#import "MXSendReplyEventStringLocalizerProtocol.h"
4445

@@ -1026,6 +1027,7 @@ FOUNDATION_EXPORT NSInteger const kMXRoomInvalidInviteSenderErrorCode;
10261027
description:(NSString *)description
10271028
threadId:(NSString*)threadId
10281029
localEcho:(MXEvent **)localEcho
1030+
assetType:(MXEventAssetType)assetType
10291031
success:(void (^)(NSString *))success
10301032
failure:(void (^)(NSError *))failure;
10311033

MatrixSDK/Data/MXRoom.m

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,6 @@ - (MXHTTPOperation*)members:(void (^)(MXRoomMembers *members))success
370370
- (void)setPartialTextMessage:(NSString *)partialTextMessage
371371
{
372372
[mxSession.store storePartialTextMessageForRoom:self.roomId partialTextMessage:partialTextMessage];
373-
if ([mxSession.store respondsToSelector:@selector(commit)])
374-
{
375-
[mxSession.store commit];
376-
}
377373
}
378374

379375
- (NSString *)partialTextMessage
@@ -2539,10 +2535,11 @@ - (MXHTTPOperation *)sendLocationWithLatitude:(double)latitude
25392535
description:(NSString *)description
25402536
threadId:(NSString*)threadId
25412537
localEcho:(MXEvent **)localEcho
2538+
assetType:(MXEventAssetType)assetType
25422539
success:(void (^)(NSString *))success
25432540
failure:(void (^)(NSError *))failure
25442541
{
2545-
MXEventContentLocation *locationContent = [[MXEventContentLocation alloc] initWithAssetType:MXEventAssetTypeUser
2542+
MXEventContentLocation *locationContent = [[MXEventContentLocation alloc] initWithAssetType:assetType
25462543
latitude:latitude
25472544
longitude:longitude
25482545
description:description];
@@ -2551,7 +2548,7 @@ - (MXHTTPOperation *)sendLocationWithLatitude:(double)latitude
25512548

25522549
[content addEntriesFromDictionary:locationContent.JSONDictionary];
25532550

2554-
NSString *fallbackText = [NSString stringWithFormat:@"%@ was at %@ as of %@", self.mxSession.myUser.displayname, locationContent.geoURI, NSDate.date];
2551+
NSString *fallbackText = [NSString stringWithFormat:@"Location was shared at %@ as of %@", locationContent.geoURI, NSDate.date];
25552552
content[kMXMessageBodyKey] = fallbackText;
25562553
content[kMXMessageContentKeyExtensibleTextMSC1767] = fallbackText;
25572554

MatrixSDK/Data/MXRoomSummary.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ - (MXHTTPOperation *)fetchLastMessageWithMaxServerPaginationCount:(NSUInteger)ma
374374

375375
// Process every message received by back pagination
376376
__block BOOL lastMessageUpdated = NO;
377+
MXWeakify(timeline);
377378
[timeline listenToEvents:^(MXEvent *event, MXTimelineDirection direction, MXRoomState *eventState) {
379+
MXStrongifyAndReturnIfNil(timeline);
378380
if (direction == MXTimelineDirectionBackwards
379381
&& !lastMessageUpdated)
380382
{

0 commit comments

Comments
 (0)