Skip to content

Commit 573b672

Browse files
committed
fix(sdk): Fix handling of UTD "insivible" events
(ones which don't produce a timeline item on their own)
1 parent fe3c736 commit 573b672

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,12 @@ impl<'a, 'i> TimelineEventHandler<'a, 'i> {
312312
}
313313

314314
if !self.result.item_added {
315+
if let Flow::Remote { position: TimelineItemPosition::Update(idx), .. } = self.flow {
316+
// If add was not called, that means the UTD event is one that
317+
// wouldn't normally be visible. Remove it.
318+
self.timeline_items.remove(idx);
319+
}
320+
315321
// TODO: Add event as raw
316322
}
317323

0 commit comments

Comments
 (0)