You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Improve thread deduplication thread process
Some threads were still holding a reference to the original thread models they were assigned to, leading to some unexpected timeline rendering
This commit is contained in:
@@ -412,9 +412,12 @@ export class MatrixEvent extends EventEmitter {
|
||||
* or in the main room timeline
|
||||
*/
|
||||
public get replyInThread(): boolean {
|
||||
const relations = this.getWireContent()["m.relates_to"];
|
||||
return this.replyEventId
|
||||
&& relations[UNSTABLE_ELEMENT_REPLY_IN_THREAD.name];
|
||||
const replyTo = this.getWireContent()
|
||||
?.["m.relates_to"]
|
||||
?.["m.in_reply_to"];
|
||||
return (this.replyEventId
|
||||
&& replyTo[UNSTABLE_ELEMENT_REPLY_IN_THREAD.name])
|
||||
|| this.thread instanceof Thread;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user