File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ impl MessageEvent {
389
389
}
390
390
}
391
391
392
- pub fn redact ( & mut self , redaction : SyncRoomRedactionEvent , version : & RoomVersionId ) {
392
+ fn redact ( & mut self , redaction : SyncRoomRedactionEvent , version : & RoomVersionId ) {
393
393
match self {
394
394
MessageEvent :: EncryptedOriginal ( _) => return ,
395
395
MessageEvent :: EncryptedRedacted ( _) => return ,
@@ -808,6 +808,11 @@ impl Message {
808
808
809
809
Span :: styled ( sender, style) . into ( )
810
810
}
811
+
812
+ pub fn redact ( & mut self , redaction : SyncRoomRedactionEvent , version : & RoomVersionId ) {
813
+ self . event . redact ( redaction, version) ;
814
+ self . html = None ;
815
+ }
811
816
}
812
817
813
818
impl From < RoomEncryptedEvent > for Message {
Original file line number Diff line number Diff line change @@ -774,7 +774,7 @@ impl ClientWorker {
774
774
Some ( EventLocation :: Message ( key) ) => {
775
775
if let Some ( msg) = info. messages . get_mut ( key) {
776
776
let ev = SyncRoomRedactionEvent :: Original ( ev) ;
777
- msg. event . redact ( ev, room_version) ;
777
+ msg. redact ( ev, room_version) ;
778
778
}
779
779
} ,
780
780
Some ( EventLocation :: Reaction ( event_id) ) => {
You can’t perform that action at this time.
0 commit comments