Skip to content

Commit 7c3d3ab

Browse files
committed
Bump to version v1.0.81 (matrix-rust-sdk/main 05d46e6)
1 parent 342dc2f commit 7c3d3ab

File tree

3 files changed

+533
-6
lines changed

3 files changed

+533
-6
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// swift-tools-version:5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33
import PackageDescription
4-
let checksum = "19861ded9099437e1bf1596bd869bcbbbe024d36c1be8aeb2fde6ee00adf7b8a"
5-
let version = "v1.0.80"
4+
let checksum = "2a88973522320c619565fc97183a63436baac89e42ed8b2638ab938ee58457f5"
5+
let version = "v1.0.81"
66
let url = "https://github.com/element-hq/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
77
let package = Package(
88
name: "MatrixRustSDK",

Sources/MatrixRustSDK/matrix_sdk_crypto.swift

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,15 @@ public enum UtdCause {
10731073
/**
10741074
* We don't have an explanation for why this UTD happened - it is probably
10751075
* a bug, or a network split between the two homeservers.
1076+
*
1077+
* For example:
1078+
*
1079+
* - the keys for this event are missing, but a key storage backup exists
1080+
* and is working, so we should be able to find the keys in the backup.
1081+
*
1082+
* - the keys for this event are missing, and a key storage backup exists
1083+
* on the server, but that backup is not working on this client even
1084+
* though this device is verified.
10761085
*/
10771086
case unknown
10781087
/**
@@ -1102,15 +1111,18 @@ public enum UtdCause {
11021111
case unknownDevice
11031112
/**
11041113
* We are missing the keys for this event, but it is a "device-historical"
1105-
* message and no backup is accessible or usable.
1114+
* message and there is no key storage backup on the server, presumably
1115+
* because the user has turned it off.
11061116
*
11071117
* Device-historical means that the message was sent before the current
11081118
* device existed (but the current user was probably a member of the room
11091119
* at the time the message was sent). Not to
11101120
* be confused with pre-join or pre-invite messages (see
11111121
* [`UtdCause::SentBeforeWeJoined`] for that).
1122+
*
1123+
* Expected message to user: "History is not available on this device".
11121124
*/
1113-
case historicalMessage
1125+
case historicalMessageAndBackupIsDisabled
11141126
/**
11151127
* The keys for this event are intentionally withheld.
11161128
*
@@ -1126,6 +1138,20 @@ public enum UtdCause {
11261138
* can be taken on our side.
11271139
*/
11281140
case withheldBySender
1141+
/**
1142+
* We are missing the keys for this event, but it is a "device-historical"
1143+
* message, and even though a key storage backup does exist, we can't use
1144+
* it because our device is unverified.
1145+
*
1146+
* Device-historical means that the message was sent before the current
1147+
* device existed (but the current user was probably a member of the room
1148+
* at the time the message was sent). Not to
1149+
* be confused with pre-join or pre-invite messages (see
1150+
* [`UtdCause::SentBeforeWeJoined`] for that).
1151+
*
1152+
* Expected message to user: "You need to verify this device".
1153+
*/
1154+
case historicalMessageAndDeviceIsUnverified
11291155
}
11301156

11311157

@@ -1146,12 +1172,14 @@ public struct FfiConverterTypeUtdCause: FfiConverterRustBuffer {
11461172

11471173
case 5: return .unknownDevice
11481174

1149-
case 6: return .historicalMessage
1175+
case 6: return .historicalMessageAndBackupIsDisabled
11501176

11511177
case 7: return .withheldForUnverifiedOrInsecureDevice
11521178

11531179
case 8: return .withheldBySender
11541180

1181+
case 9: return .historicalMessageAndDeviceIsUnverified
1182+
11551183
default: throw UniffiInternalError.unexpectedEnumCase
11561184
}
11571185
}
@@ -1180,7 +1208,7 @@ public struct FfiConverterTypeUtdCause: FfiConverterRustBuffer {
11801208
writeInt(&buf, Int32(5))
11811209

11821210

1183-
case .historicalMessage:
1211+
case .historicalMessageAndBackupIsDisabled:
11841212
writeInt(&buf, Int32(6))
11851213

11861214

@@ -1191,6 +1219,10 @@ public struct FfiConverterTypeUtdCause: FfiConverterRustBuffer {
11911219
case .withheldBySender:
11921220
writeInt(&buf, Int32(8))
11931221

1222+
1223+
case .historicalMessageAndDeviceIsUnverified:
1224+
writeInt(&buf, Int32(9))
1225+
11941226
}
11951227
}
11961228
}

0 commit comments

Comments
 (0)