From c7dfaa8f64f96d7c16d93ff2b1205082bba4a663 Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 9 Mar 2022 11:34:38 +0000 Subject: [PATCH] fix thread fallback targeting only thread relations (#8006) --- src/components/structures/ThreadView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index bb993304b2..42283bf51e 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -181,7 +181,7 @@ export default class ThreadView extends React.Component { this.setState({ thread, lastThreadReply: thread.lastReply((ev: MatrixEvent) => { - return ev.isThreadRelation && !ev.status; + return ev.isRelation(RelationType.Thread) && !ev.status; }), }, async () => { thread.emit(ThreadEvent.ViewThread); @@ -201,7 +201,7 @@ export default class ThreadView extends React.Component { if (this.state.thread) { this.setState({ lastThreadReply: this.state.thread.lastReply((ev: MatrixEvent) => { - return ev.isThreadRelation && !ev.status; + return ev.isRelation(RelationType.Thread) && !ev.status; }), }); }