Skip to content

Commit d4628e7

Browse files
t3chguygithub-actions[bot]
authored andcommitted
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]> (cherry picked from commit b05f933)
1 parent dcf71e0 commit d4628e7

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
@@ -4992,9 +4992,11 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
49924992
});
49934993

49944994
if (!unthreaded) {
4995-
const isThread = !!event.threadRootId;
4995+
// A thread cannot be just a thread root and a thread root can only be read in the main timeline
4996+
const isThread = !!event.threadRootId && !event.isThreadRoot;
49964997
body = {
49974998
...body,
4999+
// Only thread replies should define a specific thread. Thread roots can only be read in the main timeline.
49985000
thread_id: isThread ? event.threadRootId : MAIN_ROOM_TIMELINE,
49995001
};
50005002
}

0 commit comments

Comments
 (0)