Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33302488
D14246.1768779515.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14246.1768779515.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D14246: [native] wait with migration to new flow for Tunnelbroker connection
Attached
Detach File
Event Timeline
Log In to Comment