fix thread fallback targeting only thread relations (#8006)

This commit is contained in:
Germain 2022-03-09 11:34:38 +00:00 committed by GitHub
parent 782ce016d1
commit c7dfaa8f64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -181,7 +181,7 @@ export default class ThreadView extends React.Component<IProps, IState> {
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<IProps, IState> {
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;
}),
});
}