1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

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 <erice@element.io>

---------

Co-authored-by: Eric Eastwood <erice@element.io>
This commit is contained in:
Michael Telatynski
2023-07-13 09:25:23 +01:00
committed by GitHub
parent b186d79dde
commit b05f933d83

View File

@@ -5000,9 +5000,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,
};
}