From 4e1e7132d4150bb0eba8b3168f09f9b87ac18658 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 15 Apr 2020 11:04:04 +1000 Subject: [PATCH] fix bug registration done after link device cancelled to reproduce before this fix: - start link process of second device to first desktop device - quit or refresh the second device window without updating any fields - quit or refresh (a second time) the second device window without updating any fields - the second device window is now considered logged in (as a new device, not linked with the first one) This forces a full reset of the registration state when the registration components are loaded, which are loaded only if the registration is not done as required. --- ts/components/session/RegistrationTabs.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/components/session/RegistrationTabs.tsx b/ts/components/session/RegistrationTabs.tsx index 79efc3f58..23840df9a 100644 --- a/ts/components/session/RegistrationTabs.tsx +++ b/ts/components/session/RegistrationTabs.tsx @@ -124,11 +124,12 @@ export class RegistrationTabs extends React.Component<{}, State> { this.accountManager = window.getAccountManager(); // Clean status in case the app closed unexpectedly - window.textsecure.storage.remove('secondaryDeviceStatus'); } public componentDidMount() { this.generateMnemonicAndKeyPair().ignore(); + window.textsecure.storage.remove('secondaryDeviceStatus'); + this.resetRegistration().ignore(); } public render() {