[fractal/fractal-next] room-history: Display verification requests and unsupported events
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/fractal-next] room-history: Display verification requests and unsupported events
- Date: Thu, 13 Jan 2022 14:34:40 +0000 (UTC)
commit 4c5c424b58fd550f63febb927be9fcb55bfff11c
Author: Julian Sparber <julian sparber net>
Date: Fri Dec 17 16:49:25 2021 +0100
room-history: Display verification requests and unsupported events
.../content/room_history/message_row/mod.rs | 26 ++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/src/session/content/room_history/message_row/mod.rs
b/src/session/content/room_history/message_row/mod.rs
index f5a234a4..336b96f3 100644
--- a/src/session/content/room_history/message_row/mod.rs
+++ b/src/session/content/room_history/message_row/mod.rs
@@ -302,9 +302,31 @@ impl MessageRow {
};
child.video(message, &event.room().session());
}
- MessageType::VerificationRequest(_message) => {}
+ MessageType::VerificationRequest(_) => {
+ // TODO: show more information about the verification
+ let child = if let Some(Ok(child)) =
+ priv_.content.child().map(|w| w.downcast::<MessageText>())
+ {
+ child
+ } else {
+ let child = MessageText::new();
+ priv_.content.set_child(Some(&child));
+ child
+ };
+ child.text(gettext("Identity verification was started"));
+ }
_ => {
- warn!("Event not supported: {:?}", msgtype)
+ warn!("Event not supported: {:?}", msgtype);
+ let child = if let Some(Ok(child)) =
+ priv_.content.child().map(|w| w.downcast::<MessageText>())
+ {
+ child
+ } else {
+ let child = MessageText::new();
+ priv_.content.set_child(Some(&child));
+ child
+ };
+ child.text(gettext("Unsupported event"));
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]