diff --git a/frontend/app/src/components/home/thread/Thread.svelte b/frontend/app/src/components/home/thread/Thread.svelte index 9ca2b09fd8..eaa2ee9c6c 100644 --- a/frontend/app/src/components/home/thread/Thread.svelte +++ b/frontend/app/src/components/home/thread/Thread.svelte @@ -79,6 +79,7 @@ $: readonly = client.isChatReadOnly(chat.id); $: thread = rootEvent.event.thread; $: loading = !initialised && $threadEvents.length === 0 && thread !== undefined; + $: isFollowedByMe = thread !== undefined && (thread.followedByMe || thread.participantIds.has(user.userId)); function createTestMessages(ev: CustomEvent): void { if (process.env.NODE_ENV === "production") return; @@ -271,8 +272,11 @@ me={evt.event.sender === user.userId} confirmed={isConfirmed($unconfirmed, evt)} failed={isFailed($failedMessagesStore, evt)} - readByMe={evt.event.messageId === rootEvent.event.messageId || - isReadByMe($messagesRead, evt)} + readByMe={ + evt.event.messageId === rootEvent.event.messageId || + !isFollowedByMe || + isReadByMe($messagesRead, evt) + } readByThem observer={messageObserver} focused={evt.event.kind === "message" && diff --git a/frontend/openchat-client/src/openchat.ts b/frontend/openchat-client/src/openchat.ts index c2afceef49..2dcdc0ffea 100644 --- a/frontend/openchat-client/src/openchat.ts +++ b/frontend/openchat-client/src/openchat.ts @@ -2208,16 +2208,6 @@ export class OpenChat extends OpenChatAgentWorker { return [resp.events, userIds]; } - private lastMessageIndex(events: EventWrapper[]): number | undefined { - for (let i = events.length - 1; i >= 0; i--) { - const evt = events[i].event; - if (evt.kind === "message") { - return evt.messageIndex; - } - } - return undefined; - } - removeChat(chatId: ChatIdentifier): void { if (this._liveState.uninitializedDirectChats.has(chatId)) { removeUninitializedDirectChat(chatId);