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
Fix race conditions around threads (#2331)
This commit is contained in:
committed by
GitHub
parent
274d6a9597
commit
ac5fee0a69
@@ -1303,8 +1303,7 @@ export class MatrixEvent extends TypedEventEmitter<EmittedEvents, MatrixEventHan
|
||||
public isRelation(relType: string = undefined): boolean {
|
||||
// Relation info is lifted out of the encrypted content when sent to
|
||||
// encrypted rooms, so we have to check `getWireContent` for this.
|
||||
const content = this.getWireContent();
|
||||
const relation = content && content["m.relates_to"];
|
||||
const relation = this.getWireContent()?.["m.relates_to"];
|
||||
return relation && relation.rel_type && relation.event_id &&
|
||||
((relType && relation.rel_type === relType) || !relType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user