* Support token authenticated registration
https://spec.matrix.org/v1.2/client-server-api/#token-authenticated-registration
Signed-off-by: Callum Brown <callum@calcuode.com>
* Backwards compatibility with unstable auth type
Some server installs are not updated to use the stable version
of the registration token authentication type, so also handle
the unstable version defined in MSC3231.
Signed-off-by: Callum Brown <callum@calcuode.com>
* Make LOGIN_TYPE public and readonly
Co-authored-by: Travis Ralston <travpc@gmail.com>
* Remove line related to skinning
Signed-off-by: Callum Brown <callum@calcuode.com>
* Change empty string to null
Signed-off-by: Callum Brown <callum@calcuode.com>
* Use "public"s for new code style
Signed-off-by: Callum Brown <callum@calcuode.com>
* Change input to AccessibleButton
Signed-off-by: Callum Brown <callum@calcuode.com>
* Add more detail regarding source of token
Signed-off-by: Callum Brown <callum@calcuode.com>
* Fix lint error
The text and button type will be the same every time
for registration tokens, unlike (possibly) for SSO.
Signed-off-by: Callum Brown <callum@calcuode.com>
* Change null back to ""
Due to the following warning when attempting to test:
> Warning: `value` prop on `input` should not be null.
> Consider using an empty string to clear the component or
> `undefined` for uncontrolled components.
Signed-off-by: Callum Brown <callum@calcuode.com>
* Disable submit button when no token entered
Signed-off-by: Callum Brown <callum@calcuode.com>
* Add test for registration tokens
Adapted from test/components/views/dialogs/InteractiveAuthDialog-test.tsx
Signed-off-by: Callum Brown <callum@calcuode.com>
* Fix linting errors
Signed-off-by: Callum Brown <callum@calcuode.com>
* Fix test for registration tokens
Signed-off-by: Callum Brown <callum@calcuode.com>
Signed-off-by: Callum Brown <callum@calcuode.com>
Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Applies small changes to code block display in timeline
* Makes the composer code block look like the timeline display, but without line numbers
* Adds a button to allow code blocks to be implemented
* Adds tests for the new button
* 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>
* Use js-sdk imports for poll event types instead of events-sdk
* Attempt to appease some tsc --strict errors
* Manually create poll response in cypress test
* adds buttons to toggle bulleted and numbered lists on and off
* adds icons for those buttons
* css changes to timeline display
* adds tests for the new buttons, refactors existing tests
* Factor out `MessageEvent.from()` usage
The class/function is disappearing from the events-sdk, at least in this form.
* Manually create contents for events used by cypress
The utility function is out of range of the calling code at runtime, for some reason.
* Run prettier
* Maybe this will fix the build
* prune client infromation events from old devices
* test client data pruning
* remove debug
* strict
* Update src/components/views/settings/devices/useOwnDevices.ts
Co-authored-by: Michael Weimann <michaelw@matrix.org>
* improvements from review
Co-authored-by: Michael Weimann <michaelw@matrix.org>
* allows switching between modes that retains formatting
* updates rich text composer dependency to 0.13.0 (@matrix-org/matrix-wysiwyg)
* improves handling of enter keypresses when ctrlEnterTosend setting is true in plain text editor
* changes the message event content when using the new editor
* adds tests for the changes to the plain text editor
* Remove unnecessary PipContainer component
* Redesign the picture-in-picture window
* Add a hover effect to the controls
* Clarify that WidgetPip has call-specific behavior