riot-web/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
ContextMenu-test.ts
LargeLoader-test.tsx
LegacyCallEventGrouper-test.ts
MessagePanel-test.tsx
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
RoomStatusBarUnsentMessages-test.tsx
RoomView-test.tsx
SpaceHierarchy-test.tsx
TabbedView-test.tsx
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
TimelinePanel-test.tsx Merge branch 'develop' into gsouquet/threads-forceenablelabsflag 2023-01-11 11:51:57 +00:00
UserMenu-test.tsx
ViewSource-test.tsx Fix error when viewing source of redacted events (#9914) 2023-01-15 16:22:59 +00:00