Can set user recovery key from UI

This commit is contained in:
2025-11-10 17:42:32 +01:00
parent a23d671376
commit 84c90ea033
6 changed files with 162 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ export interface UserInfo {
email: string;
matrix_user_id?: string;
matrix_device_id?: string;
matrix_recovery_state?: string;
matrix_recovery_state?: "Enabled" | "Disabled" | "Unknown" | "Incomplete";
}
const TokenStateKey = "auth-state";

View File

@@ -33,4 +33,15 @@ export class MatrixLinkApi {
method: "POST",
});
}
/**
* Set a new user recovery key
*/
static async SetRecoveryKey(key: string): Promise<void> {
await APIClient.exec({
uri: "/matrix_link/set_recovery_key",
method: "POST",
jsonData: { key },
});
}
}