element-web/src/components/views/elements
Clark Fischer 2417482667
Fix error when viewing source of redacted events (#9914)
* Fix viewing source of redacted events

Clicking 'View Source' in the context menu of a redacted event causes an error,
and the user gets no visible result.

This fixes <ViewSource /> to indicate that the source is unavailable when a
message has been redacted. The original source remains available.

<SyntaxHighlight /> requires a non-null string for its `content` prop, and, in
the case of redacted events, <ViewSource /> was passing `undefined`. This is
ultimately because redacting an event causes `MatrixEvent.clearEvent` to be
`undefined`, which <ViewSource /> wasn't checking.

Fixes https://github.com/vector-im/element-web/issues/24165

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Use correct highlight.js call

Previous call signature was deprecated.

See https://github.com/highlightjs/highlight.js/issues/2277

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
2023-01-15 16:22:59 +00:00
..
crypto Apply prettier formatting 2022-12-12 12:24:14 +01:00
AccessibleButton.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
AccessibleTooltipButton.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
AppPermission.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
AppTile.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
AppWarning.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
CopyableText.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
DesktopCapturerSourcePicker.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
DialogButtons.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
DialPadBackspaceButton.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
Draggable.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
Dropdown.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
EditableItemList.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
EditableText.tsx Enable @typescript-eslint/explicit-member-accessibility on /src (#9785) 2022-12-16 12:29:59 +00:00
EditableTextContainer.tsx Enable @typescript-eslint/explicit-member-accessibility on /src (#9785) 2022-12-16 12:29:59 +00:00
EffectsOverlay.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
ErrorBoundary.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
EventListSummary.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
EventTilePreview.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
ExternalLink.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
FacePile.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
Field.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
FilterDropdown.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
GenericEventListSummary.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
ImageView.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
InfoTooltip.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
InlineSpinner.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
InteractiveTooltip.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
InviteReason.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
IRCTimelineProfileResizer.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
JoinRuleDropdown.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
LabelledCheckbox.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
LabelledToggleSwitch.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
LanguageDropdown.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
LazyRenderList.tsx Enable @typescript-eslint/explicit-member-accessibility on /src (#9785) 2022-12-16 12:29:59 +00:00
LearnMore.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
Linkify.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
LinkWithTooltip.tsx Enable @typescript-eslint/explicit-member-accessibility on /src (#9785) 2022-12-16 12:29:59 +00:00
Measured.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
MiniAvatarUploader.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
PersistedElement.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
PersistentApp.tsx Redesign the picture-in-picture window (#9800) 2023-01-04 04:44:38 +00:00
Pill.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
PollCreateDialog.tsx Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
PowerSelector.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
ProgressBar.tsx Fix progress bar regression throughout the app (#9219) 2022-08-25 16:39:00 +01:00
QRCode.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
ReplyChain.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
ResizeHandle.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
RoomAliasField.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
RoomFacePile.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
RoomName.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
RoomTopic.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
SearchWarning.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
ServerPicker.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
SettingsFlag.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
Slider.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
SpellCheckLanguagesDropdown.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
Spinner.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
Spoiler.tsx Enable @typescript-eslint/explicit-member-accessibility on /src (#9785) 2022-12-16 12:29:59 +00:00
SSOButtons.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
StyledCheckbox.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
StyledRadioButton.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
StyledRadioGroup.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
SyntaxHighlight.tsx Fix error when viewing source of redacted events (#9914) 2023-01-15 16:22:59 +00:00
Tag.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
TagComposer.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
TextWithTooltip.tsx Enable @typescript-eslint/explicit-member-accessibility on /src (#9785) 2022-12-16 12:29:59 +00:00
ToggleSwitch.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
Tooltip.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
TooltipButton.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
TooltipTarget.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
TruncatedList.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
UseCaseSelection.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
UseCaseSelectionButton.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
Validation.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00