Reconcile threads root with its children before displaying it

pull/21833/head
Germain Souquet 2021-10-15 10:26:04 +01:00
parent 3dcf0d0b7e
commit 17c4cc91af
1 changed files with 6 additions and 1 deletions

View File

@ -531,8 +531,13 @@ export default class EventTile extends React.Component<IProps, IState> {
return null;
}
const thread = this.state.thread;
const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());
const thread = room.threads.get(this.props.mxEvent.getId());
if (thread && !thread.ready) {
thread.addEvent(this.props.mxEvent, true);
}
if (!thread || this.props.showThreadInfo === false || thread.length <= 1) {
return null;
}