1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-30 04:23:07 +03:00

Ignore thread relations on state events for consistency with edits (#3540)

* Ignore thread relations on state events for consistency with edits

* Add test
This commit is contained in:
Michael Telatynski
2023-07-04 13:07:49 +01:00
committed by GitHub
parent 5be4548b3d
commit 89cabc4912
2 changed files with 40 additions and 2 deletions

View File

@ -308,4 +308,25 @@ describe("MatrixEvent", () => {
});
});
});
it("should ignore thread relation on state events", async () => {
const stateEvent = new MatrixEvent({
event_id: "$event_id",
type: "some_state_event",
content: {
"foo": "bar",
"m.relates_to": {
"event_id": "$thread_id",
"m.in_reply_to": {
event_id: "$thread_id",
},
"rel_type": "m.thread",
},
},
state_key: "",
});
expect(stateEvent.isState()).toBeTruthy();
expect(stateEvent.threadRootId).toBeUndefined();
});
});