Page MenuHomePhorge

D14246.1768779515.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D14246.1768779515.diff

diff --git a/native/backup/backup-handler.js b/native/backup/backup-handler.js
--- a/native/backup/backup-handler.js
+++ b/native/backup/backup-handler.js
@@ -10,6 +10,7 @@
import { useDeviceKind } from 'lib/hooks/primary-device-hooks.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
import { useStaffAlert } from 'lib/shared/staff-utils.js';
+import { useTunnelbroker } from 'lib/tunnelbroker/tunnelbroker-context.js';
import { getMessageForException } from 'lib/utils/errors.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { usingRestoreFlow } from 'lib/utils/services-utils.js';
@@ -40,6 +41,7 @@
const getCurrentIdentityUserState = useCurrentIdentityUserState();
const migrateToNewFlow = useMigrationToNewFlow();
+ const { socketState } = useTunnelbroker();
const startBackupHandler = React.useCallback(() => {
try {
@@ -161,6 +163,11 @@
usingRestoreFlow &&
!currentIdentityUserState.currentDeviceList.curPrimarySignature;
+ if (shouldDoMigration && !socketState.isAuthorized) {
+ backupUploadInProgress.current = false;
+ return;
+ }
+
if (shouldDoMigration && deviceKind === 'primary') {
await performMigrationToNewFlow(currentIdentityUserState);
} else if (shouldDoMigration && deviceKind === 'secondary') {
@@ -181,6 +188,7 @@
performBackupUpload,
performMigrationToNewFlow,
showAlertToStaff,
+ socketState.isAuthorized,
staffCanSee,
startBackupHandler,
]);

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 18, 11:38 PM (13 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5953460
Default Alt Text
D14246.1768779515.diff (1 KB)

Event Timeline