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
__snapshots__
accessibility
actions/handlers
audio
autocomplete
components Fix error when viewing source of redacted events (#9914) 2023-01-15 16:22:59 +00:00
contexts
editor Convert enzyme to rtl: BasicMessageComposer (#9839) 2022-12-29 20:52:51 +00:00
events
hooks static-user-onboarding-steps (#9799) 2023-01-02 14:34:34 +00:00
i18n
i18n-test
images
img
models Make calls automatically disconnect if the widget disappears (#9862) 2023-01-04 15:51:42 -05:00
modules
notifications
settings
setup
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
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
ContentMessages-test.ts Fixes empty content type during upload (#9848) 2022-12-30 08:34:38 +00:00
DecryptionFailureTracker-test.js
DeviceListener-test.ts
HtmlUtils-test.tsx Replace some enzyme tests by @testing-library/react (#9822) 2022-12-23 10:46:14 +00:00
Image-test.ts
KeyBindingsManager-test.ts
LegacyCallHandler-test.ts Confirm listen to a broadcast while recording (#9831) 2023-01-02 12:21:33 +00:00
Markdown-test.ts
MatrixClientPeg-test.ts
MediaDeviceHandler-test.ts
Notifier-test.ts Improve strict typing 2023-01-03 10:16:46 +01:00
PosthogAnalytics-test.ts
PreferredRoomVersions-test.ts
Reply-test.ts
RoomNotifs-test.ts
Rooms-test.ts Prevent unnecessary m.direct updates (#9805) 2022-12-21 09:30:08 -07:00
ScalarAuthClient-test.ts
SdkConfig-test.ts
SlashCommands-test.tsx
SlidingSyncManager-test.ts
Terms-test.tsx
TestSdkContext.ts
TextForEvent-test.ts
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
createRoom-test.ts
globalSetup.js
languageHandler-test.ts
linkify-matrix-test.ts
setupTests.js
slowReporter.js
theme-test.ts
useTopic-test.tsx