Skip to content

Commit 1e73720

Browse files
committed
sdk: Handle ephemeral events after timeline events
1 parent 36b9064 commit 1e73720

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/matrix-sdk/src/sync.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,13 @@ impl Client {
119119
let JoinedRoom { unread_notifications: _, timeline, state, account_data, ephemeral } =
120120
room_info;
121121

122-
self.handle_sync_events(HandlerKind::EphemeralRoomData, &room, &ephemeral.events)
123-
.await?;
124122
self.handle_sync_events(HandlerKind::RoomAccountData, &room, account_data).await?;
125123
self.handle_sync_state_events(&room, &state.events).await?;
126124
self.handle_sync_timeline_events(&room, &timeline.events).await?;
125+
// Handle ephemeral events after timeline, read receipts in here
126+
// could refer to timeline events from the same response.
127+
self.handle_sync_events(HandlerKind::EphemeralRoomData, &room, &ephemeral.events)
128+
.await?;
127129
}
128130

129131
for (room_id, room_info) in &rooms.leave {

0 commit comments

Comments
 (0)