Sign own device after enabling key backup

This commit is contained in:
RMidhunSuresh 2023-06-15 15:36:08 +05:30
parent fea5bc9c48
commit 69141af4c4
2 changed files with 2 additions and 9 deletions

View File

@ -151,7 +151,7 @@ export class KeyBackupViewModel extends ViewModel<SegmentType, Options> {
return !!this._crossSigning; return !!this._crossSigning;
} }
async signOwnDevice(): Promise<void> { private async _signOwnDevice(): Promise<void> {
const crossSigning = this._crossSigning; const crossSigning = this._crossSigning;
if (crossSigning) { if (crossSigning) {
await this.logger.run("KeyBackupViewModel.signOwnDevice", async log => { await this.logger.run("KeyBackupViewModel.signOwnDevice", async log => {
@ -208,6 +208,7 @@ export class KeyBackupViewModel extends ViewModel<SegmentType, Options> {
if (setupDehydratedDevice) { if (setupDehydratedDevice) {
this._dehydratedDeviceId = await this._session.setupDehydratedDevice(key); this._dehydratedDeviceId = await this._session.setupDehydratedDevice(key);
} }
await this._signOwnDevice();
} catch (err) { } catch (err) {
console.error(err); console.error(err);
this._error = err; this._error = err;

View File

@ -63,14 +63,6 @@ export class KeyBackupSettingsView extends TemplateView<KeyBackupViewModel> {
}), }),
t.if(vm => vm.canSignOwnDevice, t => { t.if(vm => vm.canSignOwnDevice, t => {
return t.div([ return t.div([
t.button(
{
onClick: disableTargetCallback(async (evt) => {
await vm.signOwnDevice();
}),
},
"Sign own device"
),
t.button( t.button(
{ {
onClick: disableTargetCallback(async () => { onClick: disableTargetCallback(async () => {