No need to overload this method

This commit is contained in:
RMidhunSuresh 2023-06-07 14:53:46 +05:30
parent 60966c482a
commit 5edf5e02c3

View File

@ -172,8 +172,6 @@ export class CrossSigning {
return this._isMasterKeyTrusted;
}
startVerification(requestOrUserId: SASRequest, log: ILogItem): SASVerification | undefined;
startVerification(requestOrUserId: string, log: ILogItem): SASVerification | undefined;
startVerification(requestOrUserId: string | SASRequest, log: ILogItem): SASVerification | undefined {
if (this.sasVerificationInProgress && !this.sasVerificationInProgress.finished) {
return;
@ -319,6 +317,13 @@ export class CrossSigning {
});
}
areWeVerified(log: ILogItem): Promise<boolean> {
return log.wrap("CrossSigning.areWeVerified", async () => {
const device = await this.deviceTracker.deviceForId(this.ownUserId, this.deviceId, this.hsApi, log);
return this.isOurUserDeviceTrusted(device!, log);
});
}
getUserTrust(userId: string, log: ILogItem): Promise<UserTrust> {
return log.wrap("CrossSigning.getUserTrust", async log => {
log.set("id", userId);