From 5bfe61a85e8113d507546f92aa773dc71d8a777d Mon Sep 17 00:00:00 2001 From: Krishan <33421343+kfiven@users.noreply.github.com> Date: Mon, 16 Feb 2026 06:03:37 +1100 Subject: [PATCH] Revert "fix: set m.fully_read marker when marking rooms as read" (#2629) Revert "Set m.fully_read marker when marking rooms as read (#2587)" This reverts commit 53a0a88e586e739fa81568334b0b43ed18833021. --- src/app/utils/notifications.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/app/utils/notifications.ts b/src/app/utils/notifications.ts index edab9196..a23bd1a4 100644 --- a/src/app/utils/notifications.ts +++ b/src/app/utils/notifications.ts @@ -1,6 +1,6 @@ import { MatrixClient, ReceiptType } from 'matrix-js-sdk'; -export async function markAsRead(mx: MatrixClient, roomId: string, privateReceipt?: boolean) { +export async function markAsRead(mx: MatrixClient, roomId: string, privateReceipt: boolean) { const room = mx.getRoom(roomId); if (!room) return; @@ -19,15 +19,8 @@ export async function markAsRead(mx: MatrixClient, roomId: string, privateReceip const latestEvent = getLatestValidEvent(); if (latestEvent === null) return; - const latestEventId = latestEvent.getId(); - if (!latestEventId) return; - - // Set both the read receipt AND the fully_read marker - // The fully_read marker is what persists your read position across sessions - await mx.setRoomReadMarkers( - roomId, - latestEventId, // m.fully_read marker - latestEvent, // m.read receipt event - privateReceipt ? { receiptType: ReceiptType.ReadPrivate } : undefined + await mx.sendReadReceipt( + latestEvent, + privateReceipt ? ReceiptType.ReadPrivate : ReceiptType.Read ); }