Skip to content

Commit

Permalink
Update isRelation
Browse files Browse the repository at this point in the history
Sneaking in from comments on #3540
  • Loading branch information
t3chguy committed Jul 4, 2023
1 parent e3b2137 commit 4c25672
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1376,10 +1376,10 @@ export class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEvents, Mat
const relation = this.getWireContent()?.["m.relates_to"];
if (
this.isState() &&
relation?.rel_type &&
!!relation?.rel_type &&
([RelationType.Replace, RelationType.Thread] as string[]).includes(relation.rel_type)
) {
// State events cannot be m.replace relations
// State events cannot be m.replace or m.thread relations
return false;
}
return !!(relation?.rel_type && relation.event_id && (relType ? relation.rel_type === relType : true));
Expand Down

0 comments on commit 4c25672

Please sign in to comment.