Remove the code that calls the origin migrator

This will have done its job now, everyone's had long enough to
install a newer version of Riot and migrate to the new origin.

Laves the code on the backend that handles it for the time being,
as per comment.
pull/11631/head
David Baker 2019-12-09 11:57:43 +00:00
parent 7776b19339
commit 89d622b8b2
4 changed files with 4 additions and 20 deletions

View File

@ -232,6 +232,10 @@ ipcMain.on('ipcCall', async function(ev, payload) {
} }
break; break;
case 'origin_migrate': case 'origin_migrate':
// NB. The code to call this has now been removed so this
// should never be called. This code itself has been removed
// with the migration to the riot-desktop repo, with the
// expectation that this will become the new home for this code.
migratingOrigin = true; migratingOrigin = true;
await migrateFromOldOrigin(); await migrateFromOldOrigin();
migratingOrigin = false; migratingOrigin = false;

View File

@ -191,14 +191,6 @@ async function loadApp() {
console.log("Using Electron platform"); console.log("Using Electron platform");
const plaf = new ElectronPlatform(); const plaf = new ElectronPlatform();
PlatformPeg.set(plaf); PlatformPeg.set(plaf);
// Electron only: see if we need to do a one-time data
// migration
if (window.localStorage.getItem('mx_user_id') === null) {
console.log("Migrating session from old origin...");
await plaf.migrateFromOldOrigin();
console.log("Origin migration complete");
}
} else { } else {
console.log("Using Web platform"); console.log("Using Web platform");
PlatformPeg.set(new WebPlatform()); PlatformPeg.set(new WebPlatform());

View File

@ -355,10 +355,6 @@ export default class ElectronPlatform extends VectorBasePlatform {
window.location.reload(false); window.location.reload(false);
} }
async migrateFromOldOrigin() {
return this._ipcCall('origin_migrate');
}
async _ipcCall(name, ...args) { async _ipcCall(name, ...args) {
const ipcCallId = ++this._nextIpcCallId; const ipcCallId = ++this._nextIpcCallId;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

View File

@ -173,12 +173,4 @@ export default class VectorBasePlatform extends BasePlatform {
getDefaultDeviceDisplayName(): string { getDefaultDeviceDisplayName(): string {
return _t("Unknown device"); return _t("Unknown device");
} }
/**
* Migrate account data from a previous origin
* Used only for the electron app
*/
async migrateFromOldOrigin() {
return false;
}
} }