Merge pull request #3603 from matrix-org/backport-3600-to-staging

[Backport staging] Fix read receipt sending behaviour around thread roots
This commit is contained in:
Andy Balaam
2023-07-14 16:03:41 +01:00
committed by GitHub
+3 -1
View File
@@ -4992,9 +4992,11 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
});
if (!unthreaded) {
const isThread = !!event.threadRootId;
// A thread cannot be just a thread root and a thread root can only be read in the main timeline
const isThread = !!event.threadRootId && !event.isThreadRoot;
body = {
...body,
// Only thread replies should define a specific thread. Thread roots can only be read in the main timeline.
thread_id: isThread ? event.threadRootId : MAIN_ROOM_TIMELINE,
};
}