Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 7ca7aa1

Browse files
dbkrjryans
andauthored
Merge pull request from GHSA-qmf4-7w7j-vf23 (#8059)
Co-authored-by: J. Ryan Stinnett <[email protected]>
1 parent 4d6643c commit 7ca7aa1

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/components/structures/ThreadPanel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ const ThreadPanel: React.FC<IProps> = ({ roomId, onClose, permalinkCreator }) =>
318318
manageReadMarkers={false} // No RM support in thread's MVP
319319
sendReadReceiptOnLoad={false} // No RR support in thread's MVP
320320
timelineSet={timelineSet}
321-
showUrlPreview={true}
321+
showUrlPreview={false} // No URL previews at the threads list level
322322
empty={<EmptyThread
323323
filterOption={filterOption}
324324
showAllThreadsCallback={() => setFilterOption(ThreadFilterType.All)}

src/components/structures/ThreadView.tsx

+1-1
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

+1-1
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

+1
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)