[fractal/fractal-next] timeline: Show not decrypted events
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/fractal-next] timeline: Show not decrypted events
- Date: Thu, 9 Sep 2021 14:26:10 +0000 (UTC)
commit f3b6356e85f4e220c793633e647c1086d5b9aa81
Author: Julian Sparber <julian sparber net>
Date: Wed Sep 8 11:34:48 2021 +0200
timeline: Show not decrypted events
We currently hide events that fail to be decrypted. This shows a
placeholder for those events in the room history.
src/session/content/message_row.rs | 4 ++++
src/session/room/event.rs | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/session/content/message_row.rs b/src/session/content/message_row.rs
index 4e6a70fe..d28a4608 100644
--- a/src/session/content/message_row.rs
+++ b/src/session/content/message_row.rs
@@ -311,6 +311,10 @@ impl MessageRow {
}
}
}
+ Some(AnyMessageEventContent::RoomEncrypted(content)) => {
+ warn!("Couldn't decrypt event {:?}", content);
+ self.show_label_with_text(&gettext("Fractal couldn't decrypt this message."))
+ }
Some(AnyMessageEventContent::RoomRedaction(_)) => {
self.show_label_with_text(&gettext("This message was removed."))
}
diff --git a/src/session/room/event.rs b/src/session/room/event.rs
index c2e6e123..59142b47 100644
--- a/src/session/room/event.rs
+++ b/src/session/room/event.rs
@@ -329,7 +329,6 @@ impl Event {
| AnySyncMessageEvent::KeyVerificationKey(_)
| AnySyncMessageEvent::KeyVerificationMac(_)
| AnySyncMessageEvent::KeyVerificationDone(_)
- | AnySyncMessageEvent::RoomEncrypted(_)
| AnySyncMessageEvent::RoomMessageFeedback(_)
| AnySyncMessageEvent::RoomRedaction(_)
| AnySyncMessageEvent::Sticker(_)
@@ -363,7 +362,6 @@ impl Event {
| AnyRedactedSyncMessageEvent::KeyVerificationKey(_)
| AnyRedactedSyncMessageEvent::KeyVerificationMac(_)
| AnyRedactedSyncMessageEvent::KeyVerificationDone(_)
- | AnyRedactedSyncMessageEvent::RoomEncrypted(_)
| AnyRedactedSyncMessageEvent::RoomMessageFeedback(_)
| AnyRedactedSyncMessageEvent::RoomRedaction(_)
| AnyRedactedSyncMessageEvent::Sticker(_)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]