Key storage out of sync: reset key backup when needed (#31279)
* add function to pause device listener * add function to check if key backup key missing both locally and in 4s * reset backup if backup key missing both locally and in 4s * fixup! add function to check if key backup key missing both locally and in 4s * Drop KEY_STORAGE_OUT_OF_SYNC_STORE in favour of checking cross-signing Check if cross-signing needs resetting, because that seems to be what KEY_STORAGE_OUT_OF_SYNC_STORE is actually trying to do. * add a function for resetting key backup and waiting until it's ready * trigger key storage out of sync toast when missing backup key locally and fetch it when user enters their recovery key * reset backup when needed if user forgets recovery key * rename function as suggested in code review
This commit is contained in:
@@ -195,6 +195,7 @@ export function createTestClient(): MatrixClient {
|
||||
content: {},
|
||||
});
|
||||
}),
|
||||
getAccountDataFromServer: jest.fn(),
|
||||
mxcUrlToHttp: jest.fn().mockImplementation((mxc: string) => `http://this.is.a.url/${mxc.substring(6)}`),
|
||||
setAccountData: jest.fn(),
|
||||
deleteAccountData: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user