You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt
+9
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,15 @@ fun TimelineItemEncryptedView(
40
40
UtdCause.UnknownDevice -> {
41
41
CommonStrings.common_unable_to_decrypt_insecure_device to CompoundDrawables.ic_compound_block
42
42
}
43
+
UtdCause.HistoricalMessage -> {
44
+
CommonStrings.timeline_decryption_failure_historical_event_no_key_backup to CompoundDrawables.ic_compound_block
45
+
}
46
+
UtdCause.WithheldUnverifiedOrInsecureDevice -> {
47
+
CommonStrings.timeline_decryption_failure_withheld_unverified to CompoundDrawables.ic_compound_block
48
+
}
49
+
UtdCause.WithheldBySender -> {
50
+
CommonStrings.timeline_decryption_failure_unable_to_decrypt to CompoundDrawables.ic_compound_error
51
+
}
43
52
else -> {
44
53
CommonStrings.common_waiting_for_decryption_key to CompoundDrawables.ic_compound_time
Copy file name to clipboardexpand all lines: features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContentProvider.kt
+18
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,24 @@ open class TimelineItemEncryptedContentProvider : PreviewParameterProvider<Timel
33
33
utdCause = UtdCause.UnsignedDevice,
34
34
)
35
35
),
36
+
aTimelineItemEncryptedContent(
37
+
data = UnableToDecryptContent.Data.MegolmV1AesSha2(
38
+
sessionId = "sessionId",
39
+
utdCause = UtdCause.HistoricalMessage,
40
+
)
41
+
),
42
+
aTimelineItemEncryptedContent(
43
+
data = UnableToDecryptContent.Data.MegolmV1AesSha2(
Copy file name to clipboardexpand all lines: libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/UtdCause.kt
+18-1
Original file line number
Diff line number
Diff line change
@@ -12,5 +12,22 @@ enum class UtdCause {
12
12
SentBeforeWeJoined,
13
13
VerificationViolation,
14
14
UnsignedDevice,
15
-
UnknownDevice
15
+
UnknownDevice,
16
+
17
+
/**
18
+
* Expected utd because this is a device-historical message and
19
+
* key storage is not setup or not configured correctly.
20
+
*/
21
+
HistoricalMessage,
22
+
23
+
/**
24
+
* The key was withheld on purpose because your device is insecure and/or the
25
+
* sender trust requirement settings are not met for your device
Copy file name to clipboardexpand all lines: libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/TimelineEventContentMapper.kt
+3
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,9 @@ private fun RustUtdCause.map(): UtdCause {
<string name="timeline_decryption_failure_historical_event_no_key_backup">"Historical messages are not available on this device"</string>
369
+
<string name="timeline_decryption_failure_unable_to_decrypt">"Unable to decrypt message"</string>
370
+
<string name="timeline_decryption_failure_withheld_unverified">"This message was blocked either because your device is unverified or because the sender needs to verify your identity."</string>
0 commit comments