diff --git a/lib/src/room.dart b/lib/src/room.dart index 02a59c3e..f1142d18 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -524,12 +524,15 @@ class Room { return false; } + // If the last event is sent, we mark the room as read. + if (lastEvent.senderId == client.userID) return false; + + // Get the timestamp of read marker and compare final readAtMilliseconds = roomAccountData['m.receipt'] ?.content .tryGetMap(client.userID!) ?.tryGet('ts') ?? 0; - return readAtMilliseconds < lastEvent.originServerTs.millisecondsSinceEpoch; }