element-web/test
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
..
@types Use server side relations for voice broadcasts (#9534) 2022-11-07 14:19:49 +00:00
__snapshots__ Handle starting a call while listen to a broadcast (#9764) 2022-12-19 08:44:19 +00:00
accessibility Apply prettier formatting 2022-12-12 12:24:14 +01:00
actions/handlers Apply prettier formatting 2022-12-12 12:24:14 +01:00
audio Apply prettier formatting 2022-12-12 12:24:14 +01:00
autocomplete Apply prettier formatting 2022-12-12 12:24:14 +01:00
components Fix error when viewing source of redacted events (#9914) 2023-01-15 16:22:59 +00:00
contexts Add voice broadcast pre-recoding PiP (#9548) 2022-11-10 09:38:48 +01:00
editor Convert enzyme to rtl: BasicMessageComposer (#9839) 2022-12-29 20:52:51 +00:00
events Improve some voice broadcast tests (#9786) 2022-12-16 18:23:29 +00:00
hooks static-user-onboarding-steps (#9799) 2023-01-02 14:34:34 +00:00
i18n Fix languages.json 2017-06-01 21:10:32 +02:00
i18n-test Apply prettier formatting 2022-12-12 12:24:14 +01:00
images Add support for Animated (A)PNG (#8158) 2022-03-28 09:38:54 +01:00
img Fix a load of warnings in the tests 2016-10-11 14:20:40 +01:00
models Make calls automatically disconnect if the widget disappears (#9862) 2023-01-04 15:51:42 -05:00
modules Apply prettier formatting 2022-12-12 12:24:14 +01:00
notifications Apply prettier formatting 2022-12-12 12:24:14 +01:00
settings Apply prettier formatting 2022-12-12 12:24:14 +01:00
setup Apply prettier formatting 2022-12-12 12:24:14 +01:00
stores Fix reply action in message context menu notif & file panels (#9895) 2023-01-12 14:52:52 +00:00
test-utils Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
toasts Apply prettier formatting 2022-12-12 12:24:14 +01:00
utils Use js-sdk imports for poll event types instead of events-sdk (#9904) 2023-01-13 10:02:33 -07:00
voice-broadcast Fix broadcast last sequence number (#9858) 2023-01-09 17:18:46 +00:00
Avatar-test.ts Ensure spaces in the spotlight dialog have rounded square avatars (#9480) 2022-10-24 08:58:36 +00:00
ContentMessages-test.ts Fixes empty content type during upload (#9848) 2022-12-30 08:34:38 +00:00
createRoom-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
DecryptionFailureTracker-test.js Apply prettier formatting 2022-12-12 12:24:14 +01:00
DeviceListener-test.ts Device manager - use deleteAccountData to prune device manager client information events (#9734) 2022-12-14 04:59:23 +00:00
globalSetup.js Apply prettier formatting 2022-12-12 12:24:14 +01:00
HtmlUtils-test.tsx Replace some enzyme tests by @testing-library/react (#9822) 2022-12-23 10:46:14 +00:00
Image-test.ts Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
KeyBindingsManager-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
languageHandler-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
LegacyCallHandler-test.ts Confirm listen to a broadcast while recording (#9831) 2023-01-02 12:21:33 +00:00
linkify-matrix-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
Markdown-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
MatrixClientPeg-test.ts Add a config flag to enable the rust crypto-sdk (#9759) 2022-12-16 17:10:26 +00:00
MediaDeviceHandler-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
Notifier-test.ts Improve strict typing 2023-01-03 10:16:46 +01:00
PosthogAnalytics-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
PreferredRoomVersions-test.ts Replace MSC3244 support with in-client room version checking (#9018) 2022-07-08 00:32:38 -06:00
Reply-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
RoomNotifs-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
Rooms-test.ts Prevent unnecessary m.direct updates (#9805) 2022-12-21 09:30:08 -07:00
ScalarAuthClient-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
SdkConfig-test.ts Show time left for voice broadcast recordings (#9564) 2022-11-10 10:53:49 +00:00
setupTests.js Move from browser-request to fetch (#9345) 2022-10-12 18:59:07 +01:00
SlashCommands-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
SlidingSyncManager-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
slowReporter.js Apply prettier formatting 2022-12-12 12:24:14 +01:00
Terms-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00
TestSdkContext.ts Add voice broadcast playback pip (#9603) 2022-11-24 09:08:41 +01:00
TextForEvent-test.ts Implement broadcast message preview (#9762) 2022-12-16 11:01:16 +00:00
theme-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
Unread-test.ts Display rooms & threads as unread (bold) if threads have unread messages. (#9763) 2023-01-11 11:49:03 +00:00
UserActivity-test.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
useTopic-test.tsx Apply prettier formatting 2022-12-12 12:24:14 +01:00