Skip to content

Commit 26eff8d

Browse files
authored
Merge pull request #11631 from vector-im/dbkr/remove_origin_migrator
Remove the code that calls the origin migrator
2 parents b7f6d7b + 685c1ba commit 26eff8d

File tree

11 files changed

+2
-479
lines changed

11 files changed

+2
-479
lines changed

electron_app/src/electron-main.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const tray = require('./tray');
3535
const vectorMenu = require('./vectormenu');
3636
const webContentsHandler = require('./webcontents-handler');
3737
const updater = require('./updater');
38-
const { migrateFromOldOrigin } = require('./originMigrator');
3938

4039
const windowStateKeeper = require('electron-window-state');
4140
const Store = require('electron-store');
@@ -64,11 +63,6 @@ if (argv["help"]) {
6463
app.exit();
6564
}
6665

67-
// boolean flag set whilst we are doing one-time origin migration
68-
// We only serve the origin migration script while we're actually
69-
// migrating to mitigate any risk of it being used maliciously.
70-
let migratingOrigin = false;
71-
7266
if (argv['profile-dir']) {
7367
app.setPath('userData', argv['profile-dir']);
7468
} else if (argv['profile']) {
@@ -231,11 +225,6 @@ ipcMain.on('ipcCall', async function(ev, payload) {
231225
mainWindow.focus();
232226
}
233227
break;
234-
case 'origin_migrate':
235-
migratingOrigin = true;
236-
await migrateFromOldOrigin();
237-
migratingOrigin = false;
238-
break;
239228
case 'getConfig':
240229
ret = vectorConfig;
241230
break;
@@ -477,13 +466,7 @@ app.on('ready', () => {
477466

478467
let baseDir;
479468
// first part of the path determines where we serve from
480-
if (migratingOrigin && target[1] === 'origin_migrator_dest') {
481-
// the origin migrator destination page
482-
// (only the destination script needs to come from the
483-
// custom protocol: the source part is loaded from a
484-
// file:// as that's the origin we're migrating from).
485-
baseDir = __dirname + "/../../origin_migrator/dest";
486-
} else if (target[1] === 'webapp') {
469+
if (target[1] === 'webapp') {
487470
baseDir = __dirname + "/../../webapp";
488471
} else {
489472
callback({error: -6}); // FILE_NOT_FOUND

electron_app/src/originMigrator.js

Lines changed: 0 additions & 72 deletions
This file was deleted.

origin_migrator/dest/browser-matrix.min.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

origin_migrator/dest/dest.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

origin_migrator/dest/dest.js

Lines changed: 0 additions & 125 deletions
This file was deleted.

origin_migrator/source.html

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)