@@ -1073,6 +1073,15 @@ public enum UtdCause {
1073
1073
/**
1074
1074
* We don't have an explanation for why this UTD happened - it is probably
1075
1075
* 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.
1076
1085
*/
1077
1086
case unknown
1078
1087
/**
@@ -1102,15 +1111,18 @@ public enum UtdCause {
1102
1111
case unknownDevice
1103
1112
/**
1104
1113
* 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.
1106
1116
*
1107
1117
* Device-historical means that the message was sent before the current
1108
1118
* device existed (but the current user was probably a member of the room
1109
1119
* at the time the message was sent). Not to
1110
1120
* be confused with pre-join or pre-invite messages (see
1111
1121
* [`UtdCause::SentBeforeWeJoined`] for that).
1122
+ *
1123
+ * Expected message to user: "History is not available on this device".
1112
1124
*/
1113
- case historicalMessage
1125
+ case historicalMessageAndBackupIsDisabled
1114
1126
/**
1115
1127
* The keys for this event are intentionally withheld.
1116
1128
*
@@ -1126,6 +1138,20 @@ public enum UtdCause {
1126
1138
* can be taken on our side.
1127
1139
*/
1128
1140
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
1129
1155
}
1130
1156
1131
1157
@@ -1146,12 +1172,14 @@ public struct FfiConverterTypeUtdCause: FfiConverterRustBuffer {
1146
1172
1147
1173
case 5 : return . unknownDevice
1148
1174
1149
- case 6 : return . historicalMessage
1175
+ case 6 : return . historicalMessageAndBackupIsDisabled
1150
1176
1151
1177
case 7 : return . withheldForUnverifiedOrInsecureDevice
1152
1178
1153
1179
case 8 : return . withheldBySender
1154
1180
1181
+ case 9 : return . historicalMessageAndDeviceIsUnverified
1182
+
1155
1183
default : throw UniffiInternalError . unexpectedEnumCase
1156
1184
}
1157
1185
}
@@ -1180,7 +1208,7 @@ public struct FfiConverterTypeUtdCause: FfiConverterRustBuffer {
1180
1208
writeInt ( & buf, Int32 ( 5 ) )
1181
1209
1182
1210
1183
- case . historicalMessage :
1211
+ case . historicalMessageAndBackupIsDisabled :
1184
1212
writeInt ( & buf, Int32 ( 6 ) )
1185
1213
1186
1214
@@ -1191,6 +1219,10 @@ public struct FfiConverterTypeUtdCause: FfiConverterRustBuffer {
1191
1219
case . withheldBySender:
1192
1220
writeInt ( & buf, Int32 ( 8 ) )
1193
1221
1222
+
1223
+ case . historicalMessageAndDeviceIsUnverified:
1224
+ writeInt ( & buf, Int32 ( 9 ) )
1225
+
1194
1226
}
1195
1227
}
1196
1228
}
0 commit comments