Skip to content

Commit c4428a8

Browse files
authored
Merge pull request from GHSA-qmf4-7w7j-vf23
1 parent 2acc8fd commit c4428a8

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/components/structures/ThreadPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ const ThreadPanel: React.FC<IProps> = ({ roomId, onClose, permalinkCreator }) =>
309309
manageReadMarkers={false} // No RM support in thread's MVP
310310
sendReadReceiptOnLoad={false} // No RR support in thread's MVP
311311
timelineSet={timelineSet}
312-
showUrlPreview={true}
312+
showUrlPreview={false} // No URL previews at the threads list level
313313
empty={<EmptyThread
314314
filterOption={filterOption}
315315
showAllThreadsCallback={() => setFilterOption(ThreadFilterType.All)}

src/components/structures/ThreadView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export default class ThreadView extends React.Component<IProps, IState> {
351351
manageReadMarkers={true}
352352
sendReadReceiptOnLoad={true}
353353
timelineSet={this.state?.thread?.timelineSet}
354-
showUrlPreview={true}
354+
showUrlPreview={this.context.showUrlPreview}
355355
// ThreadView doesn't support IRC layout at this time
356356
layout={this.state.layout === Layout.Bubble ? Layout.Bubble : Layout.Group}
357357
hideThreadedMessages={false}

src/components/views/right_panel/TimelineCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export default class TimelineCard extends React.Component<IProps, IState> {
248248
manageReadMarkers={false} // No RM support in the TimelineCard
249249
sendReadReceiptOnLoad={true}
250250
timelineSet={this.props.timelineSet}
251-
showUrlPreview={true}
251+
showUrlPreview={this.context.showUrlPreview}
252252
// The right panel timeline (and therefore threads) don't support IRC layout at this time
253253
layout={this.state.layout === Layout.Bubble ? Layout.Bubble : Layout.Group}
254254
hideThreadedMessages={false}

src/contexts/RoomContext.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const RoomContext = createContext<IRoomState>({
6060
showAvatarChanges: true,
6161
showDisplaynameChanges: true,
6262
matrixClientIsReady: false,
63+
showUrlPreview: false,
6364
timelineRenderingType: TimelineRenderingType.Room,
6465
threadId: undefined,
6566
liveTimeline: undefined,

0 commit comments

Comments
 (0)