From b30b340b43e8c3e1c7c0fa5c0dd5fee1e564cad0 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Wed, 16 Feb 2022 07:21:12 +0100 Subject: [PATCH 1/2] fix: hasNewMessage true when last event is sent --- lib/src/room.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } From a1716bd98e94f517609b0dc87e1fa9c1094ce6cc Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Wed, 16 Feb 2022 08:11:16 +0100 Subject: [PATCH 2/2] chore: Bump version --- CHANGELOG.md | 7 ++++++- pubspec.yaml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0257bf00..79e54bab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ -## [0.8.8] - 14nd Feb 2022 +## [0.8.9] - 16nd Feb 2022 +- feat: Return homeserver summary on checkHomeserver +- fix: hasNewMessage true when last event is sent +- fix: Correctly end the call. + +## [0.8.8] - 15nd Feb 2022 - fix: Has new messages compares ts - fix: handle dynamic content for pinned events diff --git a/pubspec.yaml b/pubspec.yaml index ec815cf5..76cf9aa9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: matrix description: Matrix Dart SDK -version: 0.8.8 +version: 0.8.9 homepage: https://famedly.com repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git