element-web-Github/test/components/structures
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
..
__snapshots__ Redesign the picture-in-picture window (#9800) 2023-01-04 04:44:38 +00:00
auth Use the same avatar colour when creating 1:1 DM rooms (#9850) 2023-01-05 17:05:21 +01:00
AutocompleteInput-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
ContextMenu-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
LargeLoader-test.tsx Start DM on first message (#8612) 2022-08-04 08:19:52 +02:00
LegacyCallEventGrouper-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
MessagePanel-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
PictureInPictureDragger-test.tsx Redesign the picture-in-picture window (#9800) 2023-01-04 04:44:38 +00:00
PipContainer-test.tsx Redesign the picture-in-picture window (#9800) 2023-01-04 04:44:38 +00:00
RightPanel-test.tsx Convert enzyme to rtl: RightPanel (#9837) 2022-12-29 08:40:42 +00:00
RoomSearchView-test.tsx combine search results when the query is present in multiple successive messages (#9855) 2023-01-05 11:37:58 +00:00
RoomStatusBar-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
RoomStatusBarUnsentMessages-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
RoomView-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
SpaceHierarchy-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
TabbedView-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
ThreadPanel-test.tsx Fix issue where thread dropdown would not show up correctly (#9872) 2023-01-12 11:54:03 +01:00
ThreadView-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
TimelinePanel-test.tsx Merge branch 'develop' into gsouquet/threads-forceenablelabsflag 2023-01-11 11:51:57 +00:00
UserMenu-test.tsx Replace broadcast instance with SDKContext (#9824) 2022-12-27 08:39:26 +01:00
ViewSource-test.tsx Fix error when viewing source of redacted events (#9914) 2023-01-15 16:22:59 +00:00