room-history: disable context menu for redacted messages

This commit is contained in:
Seth Falco 2023-12-16 11:31:59 +00:00 committed by Kévin Commaille
parent 43363669c8
commit a640e6dcc8

View file

@ -119,7 +119,11 @@ mod imp {
fn menu_opened(&self) {
let obj = self.obj();
let Some(event) = obj.item().and_downcast::<Event>() else {
let Some(event) = obj
.item()
.and_downcast::<Event>()
.filter(|e| !e.is_redacted())
else {
obj.set_popover(None);
return;
};