Skip to content

Commit fe3c736

Browse files
committed
refactor(sdk): Always add UTD events to the timeline
… as currently this is the only way decryption can be retried.
1 parent fd2dc18 commit fe3c736

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

crates/matrix-sdk/src/room/timeline/event_handler.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use ruma::{
2323
reaction::ReactionEventContent,
2424
relation::{Annotation, Replacement},
2525
room::{
26-
encrypted::{self, RoomEncryptedEventContent},
26+
encrypted::RoomEncryptedEventContent,
2727
member::{Change, RoomMemberEventContent},
2828
message::{self, MessageType, RoomMessageEventContent},
2929
redaction::{
@@ -439,16 +439,8 @@ impl<'a, 'i> TimelineEventHandler<'a, 'i> {
439439

440440
#[instrument(skip_all)]
441441
fn handle_room_encrypted(&mut self, c: RoomEncryptedEventContent) {
442-
match c.relates_to {
443-
Some(encrypted::Relation::Replacement(_) | encrypted::Relation::Annotation(_)) => {
444-
// Do nothing for these, as they would not produce a new
445-
// timeline item when decrypted either
446-
debug!("Ignoring aggregating event that failed to decrypt");
447-
}
448-
_ => {
449-
self.add(NewEventTimelineItem::unable_to_decrypt(c));
450-
}
451-
}
442+
// TODO: Handle replacements if the replaced event is also UTD
443+
self.add(NewEventTimelineItem::unable_to_decrypt(c));
452444
}
453445

454446
// Redacted redactions are no-ops (unfortunately)

0 commit comments

Comments
 (0)