mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Redacted messages should have their HTML removed (#67)
This commit is contained in:
parent
ca395097e1
commit
725ebb9fd6
2 changed files with 7 additions and 2 deletions
|
@ -389,7 +389,7 @@ impl MessageEvent {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn redact(&mut self, redaction: SyncRoomRedactionEvent, version: &RoomVersionId) {
|
||||
fn redact(&mut self, redaction: SyncRoomRedactionEvent, version: &RoomVersionId) {
|
||||
match self {
|
||||
MessageEvent::EncryptedOriginal(_) => return,
|
||||
MessageEvent::EncryptedRedacted(_) => return,
|
||||
|
@ -808,6 +808,11 @@ impl Message {
|
|||
|
||||
Span::styled(sender, style).into()
|
||||
}
|
||||
|
||||
pub fn redact(&mut self, redaction: SyncRoomRedactionEvent, version: &RoomVersionId) {
|
||||
self.event.redact(redaction, version);
|
||||
self.html = None;
|
||||
}
|
||||
}
|
||||
|
||||
impl From<RoomEncryptedEvent> for Message {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue