Skip to content

Commit 6bd089c

Browse files
committed
Merge branch 'master' into develop
2 parents e008d7c + ab3f1f8 commit 6bd089c

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Changes in [1.3.6](https://github.com/vector-im/riot-web/releases/tag/v1.3.6) (2019-09-19)
2+
==========================================================================================
3+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.5...v1.3.6)
4+
5+
* Fix origin migrator for SSO logins
6+
[\#10920](https://github.com/vector-im/riot-web/pull/10920)
7+
18
Changes in [1.3.5](https://github.com/vector-im/riot-web/releases/tag/v1.3.5) (2019-09-16)
29
==========================================================================================
310
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.5-rc.3...v1.3.5)

electron_app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "riot-web",
33
"productName": "Riot",
44
"main": "src/electron-main.js",
5-
"version": "1.3.5",
5+
"version": "1.3.6",
66
"description": "A feature-rich client for Matrix.org",
77
"author": "New Vector Ltd.",
88
"dependencies": {

electron_app/src/originMigrator.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ async function migrateFromOldOrigin() {
3333
webgl: false,
3434
},
3535
});
36-
ipcMain.on('origin_migration_complete', (e, success, sentSummary, storedSummary) => {
36+
const onOriginMigrationComplete = (e, success, sentSummary, storedSummary) => {
37+
// we use once but we'll only get one of these events,
38+
// so remove the listener for the other one
39+
ipcMain.removeListener('origin_migration_nodata', onOriginMigrationNoData);
40+
3741
if (success) {
3842
console.log("Origin migration completed successfully!");
3943
} else {
@@ -43,12 +47,18 @@ async function migrateFromOldOrigin() {
4347
console.error("Data stored", storedSummary);
4448
migrateWindow.close();
4549
resolve();
46-
});
47-
ipcMain.on('origin_migration_nodata', (e) => {
50+
};
51+
const onOriginMigrationNoData = (e, success, sentSummary, storedSummary) => {
52+
ipcMain.removeListener('origin_migration_complete', onOriginMigrationComplete);
53+
4854
console.log("No session to migrate from old origin");
4955
migrateWindow.close();
5056
resolve();
51-
});
57+
};
58+
59+
ipcMain.once('origin_migration_complete', onOriginMigrationComplete);
60+
ipcMain.once('origin_migration_nodata', onOriginMigrationNoData);
61+
5262
// Normalise the path because in the distribution, __dirname will be inside the
5363
// electron asar.
5464
const sourcePagePath = path.normalize(__dirname + '/../../origin_migrator/source.html');

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "riot-web",
33
"productName": "Riot",
44
"main": "electron_app/src/electron-main.js",
5-
"version": "1.3.5",
5+
"version": "1.3.6",
66
"description": "A feature-rich client for Matrix.org",
77
"author": "New Vector Ltd.",
88
"repository": {

0 commit comments

Comments
 (0)