Redacted messages should have their HTML removed (#67)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user