Skip to content

Commit 3d266aa

Browse files
Merge remote-tracking branch 'upstream/master'
# Conflicts: # MatrixSDK/Contrib/Swift/JSONModels/MXEvent.swift
2 parents ce24f2a + 8a7f6b3 commit 3d266aa

38 files changed

+373
-96
lines changed

CHANGES.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
1+
## Changes in 0.27.11 (2024-06-18)
2+
3+
No significant changes.
4+
5+
6+
## Changes in 0.27.10 (2024-06-17)
7+
8+
No significant changes.
9+
10+
11+
## Changes in 0.27.9 (2024-06-13)
12+
13+
No significant changes.
14+
15+
16+
## Changes in 0.27.8 (2024-05-29)
17+
18+
🙌 Improvements
19+
20+
- When sorting room list alphabetically, sort it case-insensitive. ([#1851](https://github.com/matrix-org/matrix-ios-sdk/pull/1851))
21+
- Crypto: Update crypto SDK to 0.4.1 ([#1853](https://github.com/matrix-org/matrix-ios-sdk/pull/1853))
22+
23+
24+
## Changes in 0.27.7 (2024-05-01)
25+
26+
No significant changes.
27+
28+
29+
## Changes in 0.27.6 (2024-02-07)
30+
31+
No significant changes.
32+
33+
34+
## Changes in 0.27.5 (2024-01-09)
35+
36+
🐛 Bugfixes
37+
38+
- Update regex for email address to be aligned email format in RFC 5322 ([#1826](https://github.com/matrix-org/matrix-ios-sdk/pull/1826))
39+
40+
🧱 Build
41+
42+
- Update CocoaPods and other gems. ([#1835](https://github.com/matrix-org/matrix-ios-sdk/pull/1835))
43+
44+
145
## Changes in 0.27.4 (2023-11-28)
246

347
🐛 Bugfixes

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source "https://rubygems.org"
22

33
gem "fastlane"
4-
gem "cocoapods", '~>1.13.0'
4+
gem "cocoapods", '~>1.14.3'
55
gem "xcode-install"
66
gem "slather"

Gemfile.lock

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ GEM
33
specs:
44
CFPropertyList (3.0.6)
55
rexml
6-
activesupport (7.0.8)
6+
activesupport (7.1.2)
7+
base64
8+
bigdecimal
79
concurrent-ruby (~> 1.0, >= 1.0.2)
10+
connection_pool (>= 2.2.5)
11+
drb
812
i18n (>= 1.6, < 2)
913
minitest (>= 5.1)
14+
mutex_m
1015
tzinfo (~> 2.0)
1116
addressable (2.8.5)
1217
public_suffix (>= 2.0.2, < 6.0)
@@ -15,31 +20,33 @@ GEM
1520
json (>= 1.5.1)
1621
artifactory (3.0.15)
1722
atomos (0.1.3)
18-
aws-eventstream (1.2.0)
19-
aws-partitions (1.828.0)
20-
aws-sdk-core (3.183.1)
23+
aws-eventstream (1.3.0)
24+
aws-partitions (1.859.0)
25+
aws-sdk-core (3.188.0)
2126
aws-eventstream (~> 1, >= 1.0.2)
2227
aws-partitions (~> 1, >= 1.651.0)
2328
aws-sigv4 (~> 1.5)
2429
jmespath (~> 1, >= 1.6.1)
25-
aws-sdk-kms (1.71.0)
26-
aws-sdk-core (~> 3, >= 3.177.0)
30+
aws-sdk-kms (1.73.0)
31+
aws-sdk-core (~> 3, >= 3.188.0)
2732
aws-sigv4 (~> 1.1)
28-
aws-sdk-s3 (1.136.0)
29-
aws-sdk-core (~> 3, >= 3.181.0)
33+
aws-sdk-s3 (1.140.0)
34+
aws-sdk-core (~> 3, >= 3.188.0)
3035
aws-sdk-kms (~> 1)
3136
aws-sigv4 (~> 1.6)
32-
aws-sigv4 (1.6.0)
37+
aws-sigv4 (1.7.0)
3338
aws-eventstream (~> 1, >= 1.0.2)
3439
babosa (1.0.4)
40+
base64 (0.2.0)
41+
bigdecimal (3.1.4)
3542
claide (1.1.0)
3643
clamp (1.3.2)
37-
cocoapods (1.13.0)
44+
cocoapods (1.14.3)
3845
addressable (~> 2.8)
3946
claide (>= 1.0.2, < 2.0)
40-
cocoapods-core (= 1.13.0)
47+
cocoapods-core (= 1.14.3)
4148
cocoapods-deintegrate (>= 1.0.3, < 2.0)
42-
cocoapods-downloader (>= 1.6.0, < 2.0)
49+
cocoapods-downloader (>= 2.1, < 3.0)
4350
cocoapods-plugins (>= 1.0.0, < 2.0)
4451
cocoapods-search (>= 1.0.0, < 2.0)
4552
cocoapods-trunk (>= 1.6.0, < 2.0)
@@ -52,7 +59,7 @@ GEM
5259
nap (~> 1.0)
5360
ruby-macho (>= 2.3.0, < 3.0)
5461
xcodeproj (>= 1.23.0, < 2.0)
55-
cocoapods-core (1.13.0)
62+
cocoapods-core (1.14.3)
5663
activesupport (>= 5.0, < 8)
5764
addressable (~> 2.8)
5865
algoliasearch (~> 1.0)
@@ -63,7 +70,7 @@ GEM
6370
public_suffix (~> 4.0)
6471
typhoeus (~> 1.0)
6572
cocoapods-deintegrate (1.0.5)
66-
cocoapods-downloader (1.6.3)
73+
cocoapods-downloader (2.1)
6774
cocoapods-plugins (1.0.0)
6875
nap
6976
cocoapods-search (1.0.1)
@@ -76,17 +83,19 @@ GEM
7683
commander (4.6.0)
7784
highline (~> 2.0.0)
7885
concurrent-ruby (1.2.2)
86+
connection_pool (2.4.1)
7987
declarative (0.0.20)
8088
digest-crc (0.6.5)
8189
rake (>= 12.0.0, < 14.0.0)
82-
domain_name (0.5.20190701)
83-
unf (>= 0.0.5, < 1.0.0)
90+
domain_name (0.6.20231109)
8491
dotenv (2.8.1)
92+
drb (2.2.0)
93+
ruby2_keywords
8594
emoji_regex (3.2.3)
8695
escape (0.0.4)
8796
ethon (0.16.0)
8897
ffi (>= 1.15.0)
89-
excon (0.103.0)
98+
excon (0.104.0)
9099
faraday (1.10.3)
91100
faraday-em_http (~> 1.0)
92101
faraday-em_synchrony (~> 1.0)
@@ -116,7 +125,7 @@ GEM
116125
faraday_middleware (1.2.0)
117126
faraday (~> 1.0)
118127
fastimage (2.2.7)
119-
fastlane (2.216.0)
128+
fastlane (2.217.0)
120129
CFPropertyList (>= 2.3, < 4.0.0)
121130
addressable (>= 2.8, < 3.0.0)
122131
artifactory (~> 3.0)
@@ -156,13 +165,13 @@ GEM
156165
xcodeproj (>= 1.13.0, < 2.0.0)
157166
xcpretty (~> 0.3.0)
158167
xcpretty-travis-formatter (>= 0.0.3)
159-
ffi (1.16.2)
168+
ffi (1.16.3)
160169
fourflusher (2.3.1)
161170
fuzzy_match (2.0.4)
162171
gh_inspector (1.1.3)
163-
google-apis-androidpublisher_v3 (0.50.0)
172+
google-apis-androidpublisher_v3 (0.53.0)
164173
google-apis-core (>= 0.11.0, < 2.a)
165-
google-apis-core (0.11.1)
174+
google-apis-core (0.11.2)
166175
addressable (~> 2.5, >= 2.5.1)
167176
googleauth (>= 0.16.2, < 2.a)
168177
httpclient (>= 2.8.1, < 3.a)
@@ -175,19 +184,19 @@ GEM
175184
google-apis-core (>= 0.11.0, < 2.a)
176185
google-apis-playcustomapp_v1 (0.13.0)
177186
google-apis-core (>= 0.11.0, < 2.a)
178-
google-apis-storage_v1 (0.19.0)
179-
google-apis-core (>= 0.9.0, < 2.a)
187+
google-apis-storage_v1 (0.29.0)
188+
google-apis-core (>= 0.11.0, < 2.a)
180189
google-cloud-core (1.6.0)
181190
google-cloud-env (~> 1.0)
182191
google-cloud-errors (~> 1.0)
183192
google-cloud-env (1.6.0)
184193
faraday (>= 0.17.3, < 3.0)
185194
google-cloud-errors (1.3.1)
186-
google-cloud-storage (1.44.0)
195+
google-cloud-storage (1.45.0)
187196
addressable (~> 2.8)
188197
digest-crc (~> 0.4)
189198
google-apis-iamcredentials_v1 (~> 0.1)
190-
google-apis-storage_v1 (~> 0.19.0)
199+
google-apis-storage_v1 (~> 0.29.0)
191200
google-cloud-core (~> 1.6)
192201
googleauth (>= 0.16.2, < 2.a)
193202
mini_mime (~> 1.0)
@@ -208,24 +217,25 @@ GEM
208217
jwt (2.7.1)
209218
mini_magick (4.12.0)
210219
mini_mime (1.1.5)
211-
mini_portile2 (2.8.4)
220+
mini_portile2 (2.8.5)
212221
minitest (5.20.0)
213222
molinillo (0.8.0)
214223
multi_json (1.15.0)
215224
multipart-post (2.3.0)
225+
mutex_m (0.2.0)
216226
nanaimo (0.3.0)
217227
nap (1.1.0)
218228
naturally (2.2.1)
219229
netrc (0.11.0)
220-
nokogiri (1.15.4)
230+
nokogiri (1.15.5)
221231
mini_portile2 (~> 2.8.2)
222232
racc (~> 1.4)
223233
optparse (0.1.1)
224234
os (1.1.4)
225235
plist (3.7.0)
226236
public_suffix (4.0.7)
227-
racc (1.7.1)
228-
rake (13.0.6)
237+
racc (1.7.3)
238+
rake (13.1.0)
229239
representable (3.2.0)
230240
declarative (< 0.1.0)
231241
trailblazer-option (>= 0.1.1, < 0.2.0)
@@ -245,11 +255,11 @@ GEM
245255
simctl (1.6.10)
246256
CFPropertyList
247257
naturally
248-
slather (2.7.4)
258+
slather (2.8.0)
249259
CFPropertyList (>= 2.2, < 4)
250260
activesupport
251261
clamp (~> 1.3)
252-
nokogiri (>= 1.13.9)
262+
nokogiri (>= 1.14.3)
253263
xcodeproj (~> 1.21)
254264
terminal-notifier (2.0.0)
255265
terminal-table (3.0.2)
@@ -259,15 +269,12 @@ GEM
259269
tty-screen (0.8.1)
260270
tty-spinner (0.9.3)
261271
tty-cursor (~> 0.7)
262-
typhoeus (1.4.0)
272+
typhoeus (1.4.1)
263273
ethon (>= 0.9.0)
264274
tzinfo (2.0.6)
265275
concurrent-ruby (~> 1.0)
266276
uber (0.1.0)
267-
unf (0.1.4)
268-
unf_ext
269-
unf_ext (0.0.8.2)
270-
unicode-display_width (2.4.2)
277+
unicode-display_width (2.5.0)
271278
webrick (1.8.1)
272279
word_wrap (1.0.0)
273280
xcode-install (2.8.1)
@@ -289,7 +296,7 @@ PLATFORMS
289296
ruby
290297

291298
DEPENDENCIES
292-
cocoapods (~> 1.13.0)
299+
cocoapods (~> 1.14.3)
293300
fastlane
294301
slather
295302
xcode-install

MatrixSDK.podspec

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

77
s.description = <<-DESC
@@ -45,7 +45,7 @@ Pod::Spec.new do |s|
4545
ss.dependency 'OLMKit', '~> 3.2.5'
4646
ss.dependency 'Realm', '10.27.0'
4747
ss.dependency 'libbase58', '~> 0.1.4'
48-
ss.dependency 'MatrixSDKCrypto', '0.3.13', :configurations => ["DEBUG", "RELEASE"], :inhibit_warnings => true
48+
ss.dependency 'MatrixSDKCrypto', '0.4.2', :configurations => ["DEBUG", "RELEASE"], :inhibit_warnings => true
4949
end
5050

5151
s.subspec 'JingleCallStack' do |ss|

MatrixSDK/Background/MXBackgroundStore.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,11 @@ class MXBackgroundStore: NSObject, MXStore {
305305
func isRoomMarked(asUnread roomId: String) -> Bool {
306306
return false
307307
}
308+
309+
func removeAllMessagesSent(before limitTs: UInt64, inRoom roomId: String) -> Bool {
310+
// Not sure if this needs to be implemented
311+
false
312+
}
308313
}
309314

310315
// MARK: - MXRoomSummaryStore
@@ -341,5 +346,4 @@ extension MXBackgroundStore: MXRoomSummaryStore {
341346
completion([])
342347
}
343348
}
344-
345349
}

MatrixSDK/Contrib/Swift/JSONModels/MXEvent.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public enum MXEventType: Equatable, Hashable {
9090

9191
case beaconInfo
9292
case beacon
93+
case roomRetention
9394

9495
case custom(String)
9596

@@ -149,6 +150,7 @@ public enum MXEventType: Equatable, Hashable {
149150
case .taggedEvents: return kMXEventTypeStringTaggedEvents
150151
case .spaceChild: return kMXEventTypeStringSpaceChild
151152
case .spaceOrder: return kMXEventTypeStringSpaceOrderMSC3230
153+
case .roomRetention: return kMXEventTypeStringRoomRetention
152154

153155
case .pollStart: return kMXEventTypeStringPollStartMSC3381
154156
case .pollResponse: return kMXEventTypeStringPollResponseMSC3381
@@ -165,7 +167,7 @@ public enum MXEventType: Equatable, Hashable {
165167
}
166168

167169
public init(identifier: String) {
168-
let events: [MXEventType] = [.roomName, .roomTopic, .roomAvatar, .roomMember, .roomCreate, .roomJoinRules, .roomPowerLevels, .roomAliases, .roomCanonicalAlias, .roomEncrypted, .roomEncryption, .roomGuestAccess, .roomHistoryVisibility, .roomKey, .roomForwardedKey, .roomKeyRequest, .roomMessage, .roomMessageFeedback, .roomRedaction, .roomThirdPartyInvite, .roomTag, .presence, .typing, .callInvite, .callInviteGk, .callCandidates, .callAnswer, .callAnswerGk, .callSelectAnswer, .callHangup, .callHangupGk, .callReject, .callRejectGk, .callNegotiate, .callReplaces, .callRejectReplacement, .callAssertedIdentity, .callAssertedIdentityUnstable, .reaction, .receipt, .roomTombStone, .keyVerificationStart, .keyVerificationAccept, .keyVerificationKey, .keyVerificationMac, .keyVerificationCancel, .keyVerificationDone, .secretRequest, .secretSend, .secretStorageDefaultKey, .taggedEvents, .spaceChild, .spaceOrder, .pollStart, .pollResponse, .pollEnd, .beaconInfo, .beacon]
170+
let events: [MXEventType] = [.roomName, .roomTopic, .roomAvatar, .roomMember, .roomCreate, .roomJoinRules, .roomPowerLevels, .roomAliases, .roomCanonicalAlias, .roomEncrypted, .roomEncryption, .roomGuestAccess, .roomHistoryVisibility, .roomKey, .roomForwardedKey, .roomKeyRequest, .roomMessage, .roomMessageFeedback, .roomRedaction, .roomThirdPartyInvite, .roomTag, .presence, .typing, .callInvite, .callCandidates, .callAnswer, .callSelectAnswer, .callHangup, .callReject, .callNegotiate, .callReplaces, .callRejectReplacement, .callAssertedIdentity, .callAssertedIdentityUnstable, .reaction, .receipt, .roomTombStone, .keyVerificationStart, .keyVerificationAccept, .keyVerificationKey, .keyVerificationMac, .keyVerificationCancel, .keyVerificationDone, .secretRequest, .secretSend, .secretStorageDefaultKey, .taggedEvents, .spaceChild, .spaceOrder, .pollStart, .pollResponse, .pollEnd, .beaconInfo, .beacon, .roomRetention]
169171

170172
if let type = events.first(where: { $0.identifier == identifier }) {
171173
self = type

MatrixSDK/Crypto/Algorithms/RoomEvent/MXRoomEventDecryption.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,13 @@ actor MXRoomEventDecryption: MXRoomEventDecrypting {
227227
])
228228
return trackedDecryptionResult(for: event, error: error)
229229

230-
case .MissingRoomKey(let message):
230+
case .MissingRoomKey(let message, let withheldCode):
231231
if undecryptedEvents[sessionId] == nil {
232232
log.error("Failed to decrypt event(s) due to missing room keys", context: [
233233
"session_id": sessionId,
234234
"message": message,
235235
"error": error,
236+
"withheldCode": withheldCode ?? "N/A",
236237
"details": "further errors for the same key will be supressed",
237238
])
238239
}

MatrixSDK/Crypto/CryptoMachine/MXCryptoMachine.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ class MXCryptoMachine {
116116
}
117117
}
118118

119+
func invalidateCache() async {
120+
await machine.clearCryptoCache()
121+
}
122+
119123
// MARK: - Private
120124

121125
private static func createMachine(userId: String, deviceId: String, log: MXNamedLog) throws -> OlmMachine {
@@ -593,9 +597,14 @@ extension MXCryptoMachine: MXCryptoCrossSigning {
593597

594598
func bootstrapCrossSigning(authParams: [AnyHashable: Any]) async throws {
595599
let result = try machine.bootstrapCrossSigning()
600+
// If this is called before the device keys have been uploaded there will be a
601+
// request to upload them, do that first.
602+
if let optionalKeyRequest = result.uploadKeysRequest {
603+
try await handleRequest(optionalKeyRequest)
604+
}
596605
let _ = try await [
597606
requests.uploadSigningKeys(request: result.uploadSigningKeysRequest, authParams: authParams),
598-
requests.uploadSignatures(request: result.signatureRequest)
607+
requests.uploadSignatures(request: result.uploadSignatureRequest)
599608
]
600609
}
601610

@@ -835,7 +844,7 @@ extension MXCryptoMachine: MXCryptoBackup {
835844
guard let message = MXCryptoTools.canonicalJSONString(forJSON: object) else {
836845
throw Error.cannotSerialize
837846
}
838-
return machine.sign(message: message)
847+
return try machine.sign(message: message)
839848
}
840849

841850
func backupRoomKeys() async throws {

0 commit comments

Comments
 (0)