element-web/test/components/views
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
..
audio_messages Show initial broadcast position in seekbar (#9796) 2022-12-22 14:30:42 +00:00
avatars Use the same avatar colour when creating 1:1 DM rooms (#9850) 2023-01-05 17:05:21 +01:00
beacon Convert enzyme to rtl: BeaconMarker (#9840) 2023-01-04 10:00:13 +00:00
beta Apply prettier formatting 2022-12-12 12:24:14 +01:00
context_menus Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
dialogs Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
elements Fix error when viewing source of redacted events (#9914) 2023-01-15 16:22:59 +00:00
location Migrate Enzyme to RTL (#9842) 2022-12-29 15:35:19 +00:00
messages Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
right_panel Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
rooms Add list functionality to rich text editor (#9871) 2023-01-13 15:44:35 +00:00
settings Fix mock client missing user functions (#9887) 2023-01-11 11:33:06 +00:00
spaces Enzyme to rtl: QuickThemeSwitcher (#9843) 2022-12-29 12:44:18 +00:00
typography Apply prettier formatting 2022-12-12 12:24:14 +01:00
user-onboarding Use the same avatar colour when creating 1:1 DM rooms (#9850) 2023-01-05 17:05:21 +01:00
voip Redesign the picture-in-picture window (#9800) 2023-01-04 04:44:38 +00:00
Validation-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00