Skip to content

Commit b05f933

Browse files
Fix read receipt sending behaviour around thread roots (#3600)
* Fix read receipt sending behaviour around thread roots * Update src/client.ts Co-authored-by: Eric Eastwood <[email protected]> --------- Co-authored-by: Eric Eastwood <[email protected]>
1 parent b186d79 commit b05f933

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/client.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -5000,9 +5000,11 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
50005000
});
50015001

50025002
if (!unthreaded) {
5003-
const isThread = !!event.threadRootId;
5003+
// A thread cannot be just a thread root and a thread root can only be read in the main timeline
5004+
const isThread = !!event.threadRootId && !event.isThreadRoot;
50045005
body = {
50055006
...body,
5007+
// Only thread replies should define a specific thread. Thread roots can only be read in the main timeline.
50065008
thread_id: isThread ? event.threadRootId : MAIN_ROOM_TIMELINE,
50075009
};
50085010
}

0 commit comments

Comments
 (0)