Enable cypress tests for shields with rust crypto (#11589)
* Use new crypto-api for cross user verification * update verification flow with new APIs * Replace some calls to `checkUserTrust` A start on https://github.com/vector-im/crypto-internal/issues/147 * Enable cypress tests * update tests * Delegate decisions on event shields to the js-sdk * rerender after editing events This is required because a transition from "valid event" to "unencrypted event" no longer triggers a state change, so the component does not render itself. Previously, this would be a transition from `verified: E2EState.Normal` to `verified: null`. * Update tests * prettier * Test coverage * Enable cypress tests for shields with rust crypto --------- Co-authored-by: Florian Duros <florianduros@element.io>
This commit is contained in:
parent
cf2340bcad
commit
50ee43c4a5
2 changed files with 9 additions and 7 deletions
|
@ -589,7 +589,14 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
|||
this.verifyEvent();
|
||||
};
|
||||
|
||||
private async verifyEvent(): Promise<void> {
|
||||
private verifyEvent(): void {
|
||||
this.doVerifyEvent().catch((e) => {
|
||||
const event = this.props.mxEvent;
|
||||
logger.error("Error getting encryption info on event", e, event);
|
||||
});
|
||||
}
|
||||
|
||||
private async doVerifyEvent(): Promise<void> {
|
||||
// if the event was edited, show the verification info for the edit, not
|
||||
// the original
|
||||
const mxEvent = this.props.mxEvent.replacingEvent() ?? this.props.mxEvent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue