Fixed read recipt issue
authorAjay Bura <ajbura@gmail.com>
Mon, 13 Sep 2021 14:17:40 +0000 (19:47 +0530)
committerAjay Bura <ajbura@gmail.com>
Mon, 13 Sep 2021 14:17:40 +0000 (19:47 +0530)
src/app/organisms/room/RoomViewContent.jsx

index 57784b633517ede752ad498f8f6caf91f4b1667e..efa8318cf1067a1a07375eba095113b8af1baa09 100644 (file)
@@ -198,7 +198,9 @@ function RoomViewContent({
   }
   function trySendingReadReceipt() {
     const { room, timeline } = roomTimeline;
-    if (doesRoomHaveUnread(room) && timeline.length !== 0) {
+    if (
+      (doesRoomHaveUnread(room) || initMatrix.notifications.hasNoti(roomId))
+      && timeline.length !== 0) {
       mx.sendReadReceipt(timeline[timeline.length - 1]);
     }
   }