From c4428a804c51c4f0ab724549323167a11d9b8e26 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 15 Mar 2022 14:08:34 +0000 Subject: [PATCH] Merge pull request from GHSA-qmf4-7w7j-vf23 --- src/components/structures/ThreadPanel.tsx | 2 +- src/components/structures/ThreadView.tsx | 2 +- src/components/views/right_panel/TimelineCard.tsx | 2 +- src/contexts/RoomContext.ts | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/structures/ThreadPanel.tsx b/src/components/structures/ThreadPanel.tsx index 30669a8eec..7544271186 100644 --- a/src/components/structures/ThreadPanel.tsx +++ b/src/components/structures/ThreadPanel.tsx @@ -309,7 +309,7 @@ const ThreadPanel: React.FC = ({ roomId, onClose, permalinkCreator }) => manageReadMarkers={false} // No RM support in thread's MVP sendReadReceiptOnLoad={false} // No RR support in thread's MVP timelineSet={timelineSet} - showUrlPreview={true} + showUrlPreview={false} // No URL previews at the threads list level empty={ setFilterOption(ThreadFilterType.All)} diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index 5fc1911ead..13fdc2d31a 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -351,7 +351,7 @@ export default class ThreadView extends React.Component { manageReadMarkers={true} sendReadReceiptOnLoad={true} timelineSet={this.state?.thread?.timelineSet} - showUrlPreview={true} + showUrlPreview={this.context.showUrlPreview} // ThreadView doesn't support IRC layout at this time layout={this.state.layout === Layout.Bubble ? Layout.Bubble : Layout.Group} hideThreadedMessages={false} diff --git a/src/components/views/right_panel/TimelineCard.tsx b/src/components/views/right_panel/TimelineCard.tsx index 72f3d42969..bd7d4361cb 100644 --- a/src/components/views/right_panel/TimelineCard.tsx +++ b/src/components/views/right_panel/TimelineCard.tsx @@ -248,7 +248,7 @@ export default class TimelineCard extends React.Component { manageReadMarkers={false} // No RM support in the TimelineCard sendReadReceiptOnLoad={true} timelineSet={this.props.timelineSet} - showUrlPreview={true} + showUrlPreview={this.context.showUrlPreview} // The right panel timeline (and therefore threads) don't support IRC layout at this time layout={this.state.layout === Layout.Bubble ? Layout.Bubble : Layout.Group} hideThreadedMessages={false} diff --git a/src/contexts/RoomContext.ts b/src/contexts/RoomContext.ts index 0c8f20686c..7665c656dd 100644 --- a/src/contexts/RoomContext.ts +++ b/src/contexts/RoomContext.ts @@ -60,6 +60,7 @@ const RoomContext = createContext({ showAvatarChanges: true, showDisplaynameChanges: true, matrixClientIsReady: false, + showUrlPreview: false, timelineRenderingType: TimelineRenderingType.Room, threadId: undefined, liveTimeline: undefined,