diff --git a/lib/src/Room.dart b/lib/src/Room.dart index 26a4a14c..e68d46a0 100644 --- a/lib/src/Room.dart +++ b/lib/src/Room.dart @@ -611,6 +611,8 @@ class Room { /// Sends *m.fully_read* and *m.read* for the given event ID. Future sendReadReceipt(String eventID) async { + this.notificationCount = 0; + client?.store?.resetNotificationCount(this.id); final dynamic resp = client.connection.jsonRequest( type: HTTPType.POST, action: "/client/r0/rooms/$id/read_markers", @@ -976,7 +978,7 @@ class Room { } Future sendTypingInfo(bool isTyping, {int timeout}) { - Map data = { + Map data = { "typing": isTyping, }; if (timeout != null) data["timeout"] = timeout; diff --git a/lib/src/StoreAPI.dart b/lib/src/StoreAPI.dart index ed05a3a1..24800ab1 100644 --- a/lib/src/StoreAPI.dart +++ b/lib/src/StoreAPI.dart @@ -92,6 +92,8 @@ abstract class StoreAPI { Future forgetRoom(String roomID); + Future resetNotificationCount(String roomID); + /// Searches for the event in the store. Future getEventById(String eventID, Room room);