Opt out from check for pre-join UISI for threads (#7834)

pull/21833/head
Germain 2022-02-17 17:34:20 +00:00 committed by GitHub
parent 9fc1f75fe5
commit e997676ae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -1331,8 +1331,12 @@ class TimelinePanel extends React.Component<IProps, IState> {
private checkForPreJoinUISI(events: MatrixEvent[]): number {
const room = this.props.timelineSet.room;
if (events.length === 0 || !room ||
!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) {
const isThreadTimeline = [TimelineRenderingType.Thread, TimelineRenderingType.ThreadsList]
.includes(this.context.timelineRenderingType);
if (events.length === 0
|| !room
|| !MatrixClientPeg.get().isRoomEncrypted(room.roomId)
|| isThreadTimeline) {
return 0;
}