mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-22 18:21:39 +01:00
Remove property
This commit is contained in:
parent
6fefc1549e
commit
b2d6a78365
@ -32,26 +32,24 @@ type Options = BaseOptions & {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export class DeviceVerificationViewModel extends ErrorReportViewModel<SegmentType, Options> {
|
export class DeviceVerificationViewModel extends ErrorReportViewModel<SegmentType, Options> {
|
||||||
private session: Session;
|
|
||||||
private sas: SASVerification;
|
private sas: SASVerification;
|
||||||
private _currentStageViewModel: any;
|
private _currentStageViewModel: any;
|
||||||
|
|
||||||
constructor(options: Readonly<Options>) {
|
constructor(options: Readonly<Options>) {
|
||||||
super(options);
|
super(options);
|
||||||
this.session = options.session;
|
|
||||||
const sasRequest = options.request;
|
const sasRequest = options.request;
|
||||||
if (options.request) {
|
if (options.request) {
|
||||||
this.start(sasRequest);
|
this.start(sasRequest);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// We are about to send the request
|
// We are about to send the request
|
||||||
this.start(this.session.userId);
|
this.start(this.getOption("session").userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async start(requestOrUserId: SASRequest | string) {
|
private async start(requestOrUserId: SASRequest | string) {
|
||||||
await this.logAndCatch("DeviceVerificationViewModel.start", (log) => {
|
await this.logAndCatch("DeviceVerificationViewModel.start", (log) => {
|
||||||
const crossSigning = this.session.crossSigning.get();
|
const crossSigning = this.getOption("session").crossSigning.get();
|
||||||
this.sas = crossSigning.startVerification(requestOrUserId, log);
|
this.sas = crossSigning.startVerification(requestOrUserId, log);
|
||||||
this.addEventListeners();
|
this.addEventListeners();
|
||||||
if (typeof requestOrUserId === "string") {
|
if (typeof requestOrUserId === "string") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user