Can set user recovery key from UI
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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 },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user